[R] Problems with corARMA
Constantinos Antoniou
costas at mit.edu
Mon Jul 11 16:06:41 CEST 2005
Dear All,
I just came across the same error message (running a gnls{nlme}
model). [R-2.1.1 on Mac OS 10.4]
For a reproducible example, please download the file:
http://mit.edu/costas/www/GR.txt
and run the following:
GR <- read.table("GR.txt",header=T)
attach(GR)
myyear <- year-1969
library(nlme)
gnls4a <- gnls(fatalities/vehicles1000~a0*(vehicles1000/
population1000)^a1,start=c
(a0=1,a1=1),data=GR,na.action=na.omit,correlation=corARMA(form=~myyear))
Thanks a lot,
Costas
On 10 ÎοÏ
ν 2005, at 8:43 Î Î, Pamela McCaskie wrote:
> Dear all
> I am tryiing to fit the following lme with an ARMA correlation
> structure:
>
> test <- lme(fixed=fev1f~year, random=~1|id2, data=pheno2,
> correlation=corARMA(value=0.2, form=~year|id2), na.action=na.omit)
>
> But I get the following error message:
>
> Error in getGroupsFormula.default(correlation, asList = TRUE) :
> "Form" argument must be a formula
>
> I have used this same form argument with differerent correlation
> structures and it has worked fine. Does anyone know why it won't
> recognise ~year | id2 (or even ~ 1 | id2) as a formula?
>
> Any help would be great
> Pam
>
> --
> Pamela A McCaskie
> BSc(Mathematical Sciences)(Hons)
>
> Western Australian Institute for Medical Research
> University of Western Australia
> SCGH Campus
> Ground Floor, B Block
> QE-II Medical Centre
> Hospital Avenue, Nedlands
> Western Australia 6009
> AUSTRALIA
> Email: pmccask at cyllene.uwa.edu.au
> Phone: +61-8-9346 1612
> Mob: 0417 926 607
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-
> guide.html
>
>
--
Constantinos Antoniou, Ph.D.
Massachusetts Institute of Technology
Intelligent Transportation Systems Program
77 Massachusetts Ave., Rm. 1-249, Cambridge, MA 02139
More information about the R-help
mailing list