[R-sig-ME] specification of corAR1()
array chip
arrayprofile at yahoo.com
Wed Aug 10 19:07:59 CEST 2011
Hi all, I am struggling to learn to use corAR1() correlation structure. Let me use the Machines data set from nlme package as an example:
I added a time variable to create a new dataset:
> Machines2<-cbind(Machines, time=c(1,2,3))
This one runs without any problem:
> lme(score~Machine,data=Machines2,random=list(Worker=pdSymm(~0+Machine)),correlation=corAR1())
But all of the following generated the same error message:
> lme(score~Machine,data=Machines2,random=list(Worker=pdSymm(~0+Machine)),correlation=corAR1(~time))
> lme(score~Machine,data=Machines2,random=list(Worker=pdSymm(~0+Machine)),correlation=corAR1(~time|Worker))
> lme(score~Machine,data=Machines2,random=list(Worker=pdSymm(~0+Machine)),correlation=corAR1(~time|Worker/Machine))
"Error in abs(value) : Non-numeric argument to mathematical function"
Did I misunderstand something here?
Thanks very much!
John
More information about the R-sig-mixed-models
mailing list