From: Douglas Bates <bates_at_stat.wisc.edu>

Date: Fri 15 Apr 2005 - 00:21:44 EST

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 Fri Apr 15 00:28:37 2005

Date: Fri 15 Apr 2005 - 00:21:44 EST

Berton Gunter wrote:

> My apologies if this is obvious:

*>
**> Is there a simple way (other than simulation or bootstrapping) to obtain a
**> (approximate)confidence interval for the ratio of 2 variance components in a
**> fitted lme model? -- In particular, if there are only 2 components (1
**> grouping factor). I'm using nlme but lme4 would be fine, too.
*

Sorry for being so late in responding. I'm way behind in reading R-help.

This particular calculation can be done for an lme fit. At present it is difficult to do this for an lmer fit.

An lme fit of a model like this has a component apVar which is an approximate variance-covariance matrix for the parameter estimates in the random effects component. The first parameter is the natural logarithm of the relative variance (ratio of the variance component to the residual variance).

> bert <- data.frame(grp = factor(rep(1:5, c(3, 9, 8, 28, 34))), resp =
scan("/tmp/bert.txt"))

Read 82 items

> fm1 <- lme(resp ~ 1, bert, ~ 1|grp)

> fm1$apVar

reStruct.grp lSigma

reStruct.grp 3.611912e+02 0.002383590

lSigma 2.383590e-03 0.006172887

attr(,"Pars")

reStruct.grp lSigma

-5.7476114 -0.6307136

attr(,"natural")

**[1] TRUE
**
You may want to look at some of the code in the lme S3 method for the
intervals generic to see how this is used.

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 Fri Apr 15 00:28:37 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:31:11 EST
*