Re: [R] Extracting Phi from gls/lme

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Thu 13 Jul 2006 - 21:59:14 EST

John Logsdon <j.logsdon@quantex-research.com> writes:

> I am trying to extract into a scalar the value of Phi from the printed
> output of gls or lme using corAR1 correlation. ie I want the estimate of
> the autocorrelation. I can't see how to do this and haven't seen it
> anywhere in str(model.lme).
>
> I can get all the other information - fixed and random effects etc.
>
> Is there an obvious way so that I can save the brick wall some damage?

Just be soft in the head...

Seriously, I think the recipe is to drill down into model.lme until you find the corAR1 class object, like this, I think.

x <- model.lme$modelStruct$corStruct
coef(x,unconstrained=FALSE).

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
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 Thu Jul 13 22:03:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 14 Jul 2006 - 00:15:06 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.