[R-sig-ME] lme:correlations tructure AR1 and random factor

Christoph Scherber Christoph.Scherber at agr.uni-goettingen.de
Wed Mar 30 17:52:34 CEST 2011


Dear Yvonne,

You need to take care that you have exactly the same nesting terms in the "correlation" and "random" component.

You *could* possibly try:;

random=~session|field
correlation =corCAR1(form = ~ session)

All the best
Christoph




Yvonne Fabian wrote:

> 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 



More information about the R-sig-mixed-models mailing list