# Linear mixed model with heteroscedastic residuals
mod <- galamm(
formula = y ~ x + (1 | id),
weights = ~ (1 | item),
data = hsced
)
# Extract residual standard deviation.
sigma(mod)
# The residual standard deviation applies to the base case. The variance
# function shown in the model output shows the estimated multiplier for
# various grouping levels:
summary(mod)
Run the code above in your browser using DataLab