Re: [R] Multilevel model in lme4 and nlme

2011-09-13 Thread jonas garcia
Hi Ben, thanks for your reply. Your suggestion does not work indeed: lme(y ~ x, random=list(~1|a:b, ~1|b:c), data=mydata) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups Here is a reproducible example of my data: set.seed(123) library(lme4) library(nlme)

Re: [R] Multilevel model in lme4 and nlme

2011-09-12 Thread Ben Bolker
jonas garcia googlemail.com> writes: > I am trying to fit some mixed models using packages lme4 and nlme. > > I did the model selection using lmer but I suspect that I may have some > autocorrelation going on in my data so I would like to have a look using the > handy correlation structures avai

[R] Multilevel model in lme4 and nlme

2011-09-12 Thread jonas garcia
Dear list, I am trying to fit some mixed models using packages lme4 and nlme. I did the model selection using lmer but I suspect that I may have some autocorrelation going on in my data so I would like to have a look using the handy correlation structures available in nlme. The problem is th