Skip to content
Back to formatted view

Raw Message

Message-ID: <20131112191441.Horde.wscwT2XY_yYaLz4XReEVwA7@mail.zih.tu-dresden.de>
Date: 2013-11-12T19:14:41Z
From: Maria Paola Bissiri
Subject: Define prior in MCMCglmm

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