I would like to extract some results from the lmermod object
require(lme4) (fm1 <- lmer(Yield ~ 1|Batch, Dyestuff))
It creates
Linear mixed model fit by REML ['lmerMod'] Formula: Yield ~ 1 | Batch Data: Dyestuff REML criterion at convergence: 319.6543 Random effects: Groups Name Std.Dev. Batch (Intercept) 42.00 Residual 49.51 Number of obs: 30, groups: Batch, 6 Fixed Effects: (Intercept) 1527
In particular, I would like to extract the standard deviations of 2 random effects, i.e. 42.00 and 49.51. I suppose there might be an inline method for this, but I could not find it quickly, so I thought I should find it using str(fm1) , which produces this:
Formal class 'lmerMod' [package "lme4"] with 13 slots ..@ resp :Reference class 'lmerResp' [package "lme4"] with 9 fields .. ..$ Ptr :<externalptr> .. ..$ mu : num [1:30] 1510 1510 1510 1510 1510 ... .. ..$ offset : num [1:30] 0 0 0 0 0 0 0 0 0 0 ... .. ..$ sqrtXwt: num [1:30] 1 1 1 1 1 1 1 1 1 1 ... .. ..$ sqrtrwt: num [1:30] 1 1 1 1 1 1 1 1 1 1 ... .. ..$ weights: num [1:30] 1 1 1 1 1 1 1 1 1 1 ... .. ..$ wtres : num [1:30] 35.1 -69.9 -69.9 10.1 70.1 ... .. ..$ y : num [1:30] 1545 1440 1440 1520 1580 ... .. ..$ REML : int 1 .. ..and 26 methods, of which 14 are possibly relevant: .. .. allInfo, copy
... but that leaves me nothing more wise.
source share