Skip to content
Back to formatted view

Raw Message

Message-ID: <64731b01-c48e-a208-5b4f-acc8809a64e0@ed.ac.uk>
Date: 2017-11-29T06:24:02Z
From: Jarrod Hadfield
Subject: blocked diagonal R structures model convergence
In-Reply-To: <CAMm5HawHyZ=P7_u4EHJzg9ijwrrvC+i-DH-tLzOvPcvt5eSEgg@mail.gmail.com>

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.