[R] LME4 to MCMCglmm

NightlordTW tw at netstorm.be
Thu May 3 18:11:21 CEST 2012


Hi all,

I am trying to run an lme4 model (logistic regression with mixed effects) in
MCMCglmm but am unsure how to implement it properly.

Currently, my lme4 model formula looks as follows: "outcome ~ (1 + var1 +
var2 | study) + var1 + var2"

In English, this means that I am fitting a random effects model, where the
intercept, var1 and var2 are jointly distributed according to study.

My question is now how I would translate this formula to the fixed and
random terms in MCMCglmm.

For the fixed part, I figured that I should make a variable
nooutcome=abs(1-outcome) because it can then be modeled with a multinomial2
family as there is no binomial(logit) option available.  Then, the fixed
part would look as follows:

cbind(outcome,nooutcome)~1+var1+var2

However, I am unsure how to specify the random effects over the intercept,
var1 and var2 jointly. So far, I was able to generate the following:

random=~us(var1):study+us(var2):study+us(1):study

which I think corresponds to  "outcome ~ (1  | study) + (var1  | study)  +
(var2  | study) +  var1 + var2" instead of "outcome ~ (1 + var1 + var2 |
study) + var1 + var2"

I would appreciate any help.

Thomas




--
View this message in context: http://r.789695.n4.nabble.com/LME4-to-MCMCglmm-tp4606423.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list