Dear List,
I tried to fit a mixed effect model.
data are like this:
group id time t
control 1 0 4.3
control 2 0 3.7
control 3 0 4.0
control 4 0 3.6
control 5 0 4.1
control 6 0 3.8
......
control 4 5 5.1
control 5 5 4.5
control 6 5 3.3
it has repeated measurement("t") for each "id" at different
"time".
So I constructed a mixed effect model using package nlme:
m1<-lme(t~time*group,random=~time|id,data=p_long)
it worked fine. However when I used
m2<-lme(t~time*group,random=~time|id,data=p_long,method="ML")
it gave me error:
"Error in lme.formula(t ~ time * group, random = ~time | id, data = p_long,
:
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (9)"
and if I changed it to
m3<-lme(t~time*group,random=~1|id,data=p_long,method="ML")
It also worked fine.
In summary,
m1 used "random=~time|id" and no "ML" (so it was
"REML"), it worked fine.
m2 used "random=~time|id" and "ML", it gave errors
m3 used "random=~1|id", and "ML", it worked fine.
Could someone explain these to me?
Thanks you.
[[alternative HTML version deleted]]