Skip to content
Prev 5755 / 20628 Next

lme:correlations tructure AR1 and random factor

Dear mixed models specialists,

I tried these model to run in the package nlme, but allways got the same
error message...

I have a timeseries correlation in 5 sessions within 12 fields with 12 traps per field.

res2a <- lme(response~x+y+z+treatment,correlation =
corCAR1(form = ~ session|trapfield), random=~1|field, na.action=na.omit,
data=plates, method="ML")

 Error: Incompatible formulas for groups in "random" and "correlation"
I do not want to use trapfield as a random factor and using only session|field in the correlation term leaves me with a errormessage that there have to be unique values.
Do you have any suggestions what to do?

thanks a lot!
Yvonne