Define prior in MCMCglmm
Dear Szymek,
thank you very much for your answer.
Yes, the random effects were indicated wrongly in MCMCglmm! My
intention is of course to look at variance associated with subjects
(subj_ID).
I meant (1 + fin_B|subj_ID), as indicated in glmer() (lme4 package).
And this should be indicated in MCMCglmm() as random = ~us(1):subj_ID
+ us(fin_B):subj_ID.
Please, correct me if I am wrong.
So the model runs with:
k <- length(levels(fallmid$resp_X))
I <- diag(k-1)
J <- matrix(rep(1, (k-1)^2), c(k-1, k-1))
prior <- list(R = list(fix = 1, V = 0.5 * (I+J), n = 2),
G = list(G1 = list(V = diag(1), n = 2), G2 = list(V
= diag(2), n = 2)))
fallmid.MCMCglmm <- MCMCglmm(resp_X ~ lang * ini_pch + lang * manner +
lang * fin_B,
random = ~us(1):subj_ID + us(fin_B):subj_ID,
family="categorical", data=fallmid,
prior=prior
)
In your suggestion you indicate nu=2.002. What does "nu" mean? What is
the difference between nu and n? In the MCMCglmm manual and in the
tutorial they are both defined as "degrees of belief". What does this
mean?
Kind regards,
Maria Paola
Zitat von Szymek Drobniak <geralttee at gmail.com>:
Dear Maria, I'm not sure what exactly you're trying to test with your model, but to start with - your prior specification assumes 2 random effects, and your model has only one (a structured covariance matrix with fin_B defined as a random effect). This specification you've provided is similar to a random intercept/slope model - but I can't see why you would like to fit it (most importantly, you assumed that fin_B is both a fixed and random effect). If your intention was to look at variance associated with subjects (subj_ID), and you'd like to see if this variance is heterogeneous for different levels of fin_B - you could fit: MCMCglmm(your_fixed_formula_here, random=~us(fin_B):subj_ID, ...) and the prior would be (assuming fin_B has 2 levels as you've said) list(R=list(V=1, fix=1), G=list(G1=list(V=diag(2),nu=2.002))) that's for start, then have a look at mcmc-series plots to see if it mixes well and tweak your model further if necessary. Cheer szymek
Dr. Maria Paola Bissiri TU Dresden Fakult?t Elektrotechnik und Informationstechnik Institut f?r Akustik und Sprachkommunikation 01062 Dresden Barkhausen-Bau, Raum S54 Helmholtzstra?e 18 Tel: +49 (0)351 463-34283 Fax: +49 (0)351 463-37781 E-Mail: Maria_Paola.Bissiri at tu-dresden.de http://wwwpub.zih.tu-dresden.de/~bissiri/index.htm