[R] lme object manipulation

SHIN LIN
2007-11-27T11:42:37Z

Thanks for the reply, but I looked in each element of names(lme_res2) but did
not find the value I was looking for.  Is there a way to output the object
contents to a text file?  I can then lift the value with text manipulation.

Obviously, other solutions are welcome, too.

Shin

----- Original Message -----
From: Moshe Olshansky <m_olshansky at yahoo.com>
Date: Monday, November 26, 2007 10:50 pm
Subject: Re: [R] lme object manipulation
To: SHIN LIN <slina at jhmi.edu>


> There may be a better way of doing this, but one
>  possibility is to look at names(lme_res2) and then if
>  something whose name is x may be of interest to you,
>  look at lme_res2$x.
>
>  --- SHIN LIN <slina at jhmi.edu> wrote:
>
>  > Hello:
>  >
>  > I have an lme object, say lme_res2,  which was
>  > generated using the varIdent.  I'm trying to extract
>  > the double 1.532940 from the object, but I can't
>  > find it by attributes(lme_res2) or
>  > attributes(summary(lme_res2)).  How can I pull it
>  > out (so that I can save it to another variable)?
>  > Thanks.
>  >
>  > Shin
>  >
>  > Linear mixed-effects model fit by REML
>  >   Data: dat
>  >   Log-restricted-likelihood: 22.3213
>  >   Fixed: express1 ~ race * thaps + race * tuni
>  > (Intercept)        race       thaps        tuni
>  > race:thaps   race:tuni
>  >  7.00034057 -0.02675202 -0.05687972  0.01265845
>  > -0.03859781 -0.11248439
>  > Random effects:
>  >  Formula: ~1 | fam
>  >         (Intercept)
>  > StdDev:   0.1131353
>  >  Formula: ~1 | twin %in% fam
>  >         (Intercept)
>  > StdDev:   0.1740635
>  >  Formula: ~1 | thaw %in% twin %in% fam
>  >         (Intercept)  Residual
>  > StdDev:   0.1177579 0.1182267
>  > Variance function:
>  >  Structure: Different standard deviations per
>  > stratum
>  >  Formula: ~1 | race
>  >  Parameter estimates:
>  >        0        1
>  > 1.000000 1.532940
>  > Number of Observations: 218
>  > Number of Groups:
>  >                     fam           twin %in% fam thaw
>  > %in% twin %in% fam
>  >                      33                      66
>  >                102
>  >
>  > ______________________________________________
>  > R-help at r-project.org mailing list
>  >
>  > PLEASE do read the posting guide
>  >
>  > and provide commented, minimal, self-contained,
>  > reproducible code.
>  >