Re: [R] Problems with corARMA

From: Constantinos Antoniou <costas_at_mit.edu>
Date: Tue 12 Jul 2005 - 00:06:41 EST

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@cyllene.uwa.edu.au
> Phone: +61-8-9346 1612
> Mob: 0417 926 607
>
> ______________________________________________
> R-help@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



R-help@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 Received on Tue Jul 12 00:12:21 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:28 EST