Extract variance and correlation components from model
Arguments
- x
An object of class
galammreturned fromgalamm.- sigma
Numeric value used to multiply the standard deviations. Defaults to 1.
- ...
Other arguments passed onto other methods. Currently not used.
See also
print.VarCorr.galamm() for the print function.
Other details of model fit:
coef.galamm(),
confint.galamm(),
deviance.galamm(),
factor_loadings.galamm(),
family.galamm(),
fitted.galamm(),
fixef(),
formula.galamm(),
llikAIC(),
logLik.galamm(),
nobs.galamm(),
predict.galamm(),
print.VarCorr.galamm(),
ranef.galamm(),
residuals.galamm(),
response(),
sigma.galamm(),
vcov.galamm()
Examples
# Linear mixed model with heteroscedastic residuals
mod <- galamm(
formula = y ~ x + (1 | id),
dispformula = ~ (1 | item),
data = hsced
)
# Extract information on variance and covariance
VarCorr(mod)
#> Groups Name Std.Dev. Variance
#> id (Intercept) 0.99400 0.98804
#> Residual 0.97964 0.95970
# Convert to data frame
# (this invokes lme4's function as.data.frame.VarCorr.merMod)
as.data.frame(VarCorr(mod))
#> grp var1 var2 vcov sdcor
#> 1 id (Intercept) <NA> 0.9880425 0.9940033
#> 2 Residual <NA> <NA> 0.9596999 0.9796427
