[R-sig-ME] Define prior in MCMCglmm
Maria Paola Bissiri
Maria_Paola.Bissiri at tu-dresden.de
Tue Nov 12 20:14:41 CET 2013
Dear list members,
how should I define the prior for my MCMCglmm model with random =
~us(1+subj_ID):fin_B?
fin_B is dichotomous, subj_ID has 86 levels (the experiment participants).
The response variable resp_X ist dichotomous.
When I run for instance the following ...
(an attempt inspired by
http://hlplab.wordpress.com/2009/05/07/multinomial-random-effects-models-in-r/)
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 = 4),
G = list(
G1 = list(V = diag(1), n = 2),
G2 = list(V = diag(1), n = 2)))
fallmid.MCMCglmm <- MCMCglmm(resp_X ~ lang * ini_pch + lang * manner +
lang * fin_B,
random = ~us(1+subj_ID):fin_B,
family="categorical", data=fallmid,
prior=prior
)
.... I get the following error message.
Error in MCMCglmm(resp_X ~ lang * ini_pch + lang * manner + lang * fin_B, :
prior$G has the wrong number of structures
How should I define G? Is R fine as it is?
I researched everywhere in Internet and asked people about it, but I
don't understand how V and n should be indicated. I would be grateful
if you could help.
Kind regards,
Maria Paola
--
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
More information about the R-sig-mixed-models
mailing list