r - Interval around variance components -


I have an interest in the (confidence) interval of variance components or standard errors or something similar (sample based?) Keep the Lme4 :: for random effects in the lmer model.

I'm sure I'm maximizing things (and I know standard errors are not considered the right thing), but I would greatly appreciate some lines of code that have confidence in these estimates Gives some solutions.

In VarCorr's help page, in the example I should assure that repeat three values ​​in the Variance column of this Outlook:

Data (Orthodont, Package = "NLME") FM1 and LT; - Lemer (distance ~ age + (age | topic), data = Orthodont) VC & lt; - VarCorr (fm1) Print (VC, Comp = c ("variance"))

Initial: (I'm going to take the liberty to use a different example, as something looks strange about the Orthodont << which I will pay attention to ...)

  Library ("lme4") fm1 & lt; - lmer (reaction ~ day + (day | topic), data = sleep) Vc & lt; - VarCorr (fm1) print (vc, comp = c ("variance"))  

Compute confidence interval Using old name = FALSE , we get more meaningful names to work with:

  cc & lt; - confint (fm1, which = "theta_", oldNames = FALSE) print (cc, number = 3) ## 2.5% 97.5% ## sd_ (interception). Topic 14.382 37.716 ## Crossdeses (Blocking). Topic -0.482 0.685 ## sd_Days | Subject: 3.801 8.753 ## Sigma 22.898 28.858  

Squirting cc gives us confidence for variants - Unfortunately for the square correlation coefficient the confidence interval is rather useless (we Probably would prefer faith intervals for sympathy, which would take more work). Drop the second (correlation) line, and drop the soon-to-be-misleading sd_ / cor_ tag at the beginning of the line name:

  ccsq & lt; - cc [-2,] ^ 2 rownames (ccsq) & lt; - gsub ("^. * _", "", Rownames (ccsq)) ccsq ## 2.5% 97.5% ## (blocking) topic 206.82812 1422.49637 ## days | Subject: 14.44885 76.62172 ## Sigma 524.33063 832.78396  

(Note that the last line is 95% CI for residual variance, not residual standard deviation, even if I have not changed the name ... )


Comments