[R] lme with corAR1 errors - can't find AR coefficient in output

Stephen Weigand weigand.stephen at gmail.com
Fri May 25 20:48:44 CEST 2007


Millo,

On 5/24/07, Millo Giovanni <Giovanni_Millo at generali.com> wrote:

> Dear List,
>
> I am using the output of a ML estimation on a random effects model with
> first-order autocorrelation to make a further conditional test. My model
> is much like this (which reproduces the method on the famous Grunfeld
> data, for the econometricians out there it is Table 5.2 in Baltagi):
>
> library(Ecdat)
> library(nlme)
> data(Grunfeld)
> mymod<-lme(inv~value+capital,data=Grunfeld,random=~1|firm,correlation=co
> rAR1(0,~year|firm))
>
> Embarrassing as it may be, I can find the autoregressive parameter
> ('Phi', if I get it right) in the printout of summary(mymod) but I am
> utterly unable to locate the corresponding element in the lme or
> summary.lme objects.
>
> Any help appreciated. This must be something stupid I'm overlooking,
> either in str(mymod) or in the help files, but it's a huge problem for
> me.
>
>

Try

coef(mymod$model$corStruct,
       unconstrained = FALSE)

Stephen
-- 
Rochester, Minn. USA



More information about the R-help mailing list