[R-sig-ME] Bivariate MCMCglmm: fixed effect error

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Wed Apr 6 00:58:31 CEST 2022

   A couple of quick thoughts.

   1. These doesn't look parameter-expanded priors to me (don't you have 
to specify alpha.V != 0 in order to get parameter-expanded priors?)

  prior: optional list of prior specifications having 3 possible
           elements: ‘R’ (R-structure) ‘G’ (G-structure) and ‘B’ (fixed
           effects). ‘B’ is a list containing the expected value (‘mu’)
           and a (co)variance matrix (‘V’) representing the strength of
           belief: the defaults are ‘B$mu’=0 and ‘B$V’=I*1e+10, where
           where I is an identity matrix of appropriate dimension.  The
           priors for the variance structures (‘R’ and ‘G’) are lists
           with the expected (co)variances (‘V’) and degree of belief
           parameter (‘nu’) for the inverse-Wishart, and also the mean
           vector (‘alpha.mu’) and covariance matrix (‘alpha.V’) for the
           redundant working parameters. The defaults are ‘nu’=0, ‘V’=1,
           ‘alpha.mu’=0, and ‘alpha.V’=0. When ‘alpha.V’ is non-zero,
           parameter expanded algorithms are used.

2. MCMCglmm is explicitly telling you to use stronger priors, which I 
would interpret in this context as "larger values of nu" (nu = 0.002 
seems *very* small ...)

   I don't use MCMCglmm every day, so I may have missed something/be 

On 4/4/22 6:19 AM, Tara Cox [RPG] wrote:
> Dear list,
> I am stuck attempting to run a bivariate MCMCglmm that uses personality score and age at first breeding (years) as response variables (both modelled Poisson). I have multiple repeats per individual for personality score, but a single value for age at first breeding. For fixed effects, I have included drivers known to impact personality score (age when tested, age2, colour of room that individual was tested in, and the test number) as well as age at first breeding (natal territory quality and island-wide food availability).
> To account for the fact that individuals born more recently in the dataset lived short lives (as per Bouwhuis et al., 2010), I have also included cohort as a fixed effect for age at first breeding.
> I've been using the covu method with a parameter expanded prior and model specification outlined below, but I am having issues when trying to run the model with cohort as a fixed effect (error message states: '## Error in MCMCglmm(fitness.stack ~ variable - 1 + at.level(variable, : Mixed model equations singular: use a (stronger) prior'). I have tried setting cohort as both numeric and factor when including it as a fixed effect, but this doesn't make a difference. I know the issue is not with any other part of the model, as it runs successfully when cohort is removed as a fixed effect.
> prior.age <- list(G = list(G1 = list(V = diag(1), nu = 1),                            # rand effect for Cohort (fitted for AGE_BREEDING)
>                                           G2 = list(V = diag(1), nu = 1)),                           # rand effect for Observer (fitted for Personality)
>                             R = list(R1 = list(V = diag(2), nu = 0.002, covu = TRUE),  # 2-way var-cov matrix of ID for Personality, residual for AGE_BREEDING
>                                           R2 = list(V = diag(1), nu = 0.002)))                       # residual for Personality
> m1  <-   MCMCglmm(fitness.stack ~ variable - 1 +
>                              at.level(variable, "Personality"):Personality_Age +
>                              at.level(variable, "Personality"):Personality_Age2 +
>                              at.level(variable, "Personality"):Personality_RoomColour +
>                              at.level(variable, "Personality"):TestNumber +
>                              at.level(variable, "AGE_BREEDING"):logNatalTerritoryQuality +
>                              at.level(variable, "AGE_BREEDING"):logIslandWideFoodAvailability +
>                              at.level(variable, "AGE_BREEDING"):Cohort,
>                            random = ~ us(at.level(variable,"Personality")):Observer + us(at.level(variable,"AGE_BREEDING")):Cohort + us(at.level(variable, "Personality")):BirdID,
>                            rcov = ~us(at.level(variable, "AGE_BREEDING")):BirdID + idh(at.level(variable, "Personality")):units,
>                            family = NULL, # specified already in the data as poisson for both
>                            prior = prior.age,
>                            nitt=4600000,
>                            burnin=60000,
>                            thin=500,
>                            verbose = FALSE,
>                            pr=FALSE,
>                            data = stack)
> In case the issue is related to sample size or data structure, I have also attached an Rmd containing this info.
> If anyone could provide any insight into how I can get my model to run successfully, it would be much appreciated!
> Best wishes,
> Tara
> Tara Cox
> Pronouns: she, her, hers
> PhD researcher
> Dugdale group, School of Biology
> Faculty of Biological Sciences
> University of Leeds
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics

More information about the R-sig-mixed-models mailing list