Skip to content
Back to formatted view

Raw Message

Message-ID: <1313000207.89768.YahooMailNeo@web125801.mail.ne1.yahoo.com>
Date: 2011-08-10T18:16:47Z
From: array chip
Subject: specification of corAR1()
In-Reply-To: <1312998703.10700.72.camel@prometheus.geog.ucl.ac.uk>

Thanks Garvin. I figured it out as well, :-)


John



----- Original Message -----
From: Gavin Simpson <gavin.simpson at ucl.ac.uk>
To: array chip <arrayprofile at yahoo.com>
Cc: "r-sig-mixed-models at r-project.org" <r-sig-mixed-models at r-project.org>
Sent: Wednesday, August 10, 2011 10:51 AM
Subject: Re: [R-sig-ME] specification of corAR1()

On Wed, 2011-08-10 at 10:07 -0700, array chip wrote:
> 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())

That's not what the first argument of corAR1() is for. Not the first
time that has caught someone out (there's at least you and me!).

G

> 
> 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
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dr. Gavin Simpson? ? ? ? ? ?  [t] +44 (0)20 7679 0522
ECRC, UCL Geography,? ? ? ? ? [f] +44 (0)20 7679 0565
Pearson Building,? ? ? ? ? ?  [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street, London? ? ? ? ? [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT.? ? ? ? ? ? ? ?  [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%