Hi,

I'm trying to use AR1 as a correlation structure in modeling data. My
variables, Patient and Region, are factors with Region nested in Patient.
Expression is my Response variable.

*Patient <- c(rep('1', 10), rep('2', 12))*

*Region <- c(rep('1', 3), rep('2', 3), rep('3', 4), rep('4', 4), rep('5',
4), rep('6', 4))*
library(nlme)

The code  *lme(Expression ~ Patient + **Region**, random = ~1 |
Patient/Region, correlation=corAR1(form=~1 | Patient/Region), data=df) *works,
but

*lme(Expression ~ Patient ** + **Region**, random = ~1 | Patient/Region,
correlation=corAR1(form=~Region | Patient/Region), data=df)*
gives me the following error:

*Error in Initialize.corAR1(X[[2L]], ...) : *

* Covariate must have unique values within groups for corAR1 objects*

Any help is highly appreciated,

Angelina

	[[alternative HTML version deleted]]

