[R-sig-ME] VarIdent, extracting delta value
Afshartous, David
DAfshartous at med.miami.edu
Thu Aug 27 16:44:50 CEST 2009
All,
When using varIdent to specify different residual error variance per strata,
one obtains the ratio between the standard deviations of the strata (see P&B
p.211), and this is included in the summary output. However, perhaps I'm
missing something extremely basic but I don't see where this is within
str((summary(m1)) for a given model and hence cannot extract it. A
workaround is below, but if anyone knows the direct method please advise.
Cheers,
David
Library("nlme")
m1 = lme(distance ~ age, random = ~ 1 | Subject, weights = varIdent(form =
~ 1 | Sex), data = Orthodont)
summary(m1)
## shows that delta = 0.4533690
##
Variance function:
Structure: Different standard deviations per stratum
Formula: ~1 | Sex
Parameter estimates:
Male Female
1.0000000 0.4533690
##
str(summary(m1))
## workaround:
1/attr(m1$modelStruct[[2]], "weights")[100]
Female
0.4533690
######################################################
> sessionInfo()
R version 2.9.1 (2009-06-26)
i386-apple-darwin8.11.1
locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] nlme_3.1-92 lattice_0.17-25
loaded via a namespace (and not attached):
[1] grid_2.9.1 lme4_0.999375-31 Matrix_0.999375-29
>
More information about the R-sig-mixed-models
mailing list