jeudi 3 octobre 2019

multiple random effects in nlme

I need to include one more random effect in my lme model. However, these 2 random effects are not related, therefore cannot be nested.

I am not sure how to write the code for this. I've tried the following:

modelA <- lme(FT~ Init.Age + Sex + Status, random= (1|Patient) + (1|Site), data = data, na.action = na.omit)

 modelB <- lme(FT~ Init.Age + Sex + Status, random= list (~1|Patient, ~1|Site), data = data, na.action = na.omit)

only model B works. But it gives me exactly the same results as random= ~1|Patient and I think that cannot be correct. The results are the following: enter image description here

Thanks for your help! lil




Aucun commentaire:

Enregistrer un commentaire