[R-sig-ME] blocked diagonal R structures model convergence
Jarrod Hadfield
j.hadfield at ed.ac.uk
Wed Nov 29 07:24:02 CET 2017
Hi Rob,
The chain is not mixing because many of the parameters in the residual
structure are not identifiable in the likelihood. The two R matrices
should be 2x2 not 4x4; at the moment you are estimating all the residual
covariances between all the traits twice (i.e 20 parameters rather than
the 6 that are identifiable). The correct syntax is
us(at.level(trait, 1:2)):units+us(at.level(trait, 3:4)):units
However, this is quite an inefficient way of setting up the model.
Better to have the two responses as traits and then have sex as a
categorical predictor. The model would then be:
mod1 <- MCMCglmm(cbind(g,p) ~ trait-1 + trait:sex
trait:r1:sex + trait:r2:sex,
random = ~us(trait:sex):animal + us(trait:sex):dam,
rcov = ~us(trait:at.level(sex, "1")):units+us(trait:at.level(sex,
"2")):units,
family = c("gaussian", "poisson")
This should run faster and mix better because half the data aren't missing.
Cheers,
Jarrod
On 24/11/2017 14:49, Robert Griffin wrote:
> family = c("gaussian", "poisson", "gaussian", "poisson")
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list