reliability {mlmhelpr}R Documentation

Calculate reliability coefficients for random effects

Description

This function computes reliability coefficients for random effects according to Raudenbush and Bryk (2002) and Snijders and Bosker (2012). The reliability coefficient is equal to the proportion of between group variance to total variance: \frac{\tau^2}{\tau^2 + {\frac{\sigma^2}{n_j}}}. The empirical Bayes estimator for the random effect is a weighted combination of the cluster mean and grand mean with the weight given by the reliability of the random effect. We refer to this as a reliability because in classical test theory the ratio of the true score variance, \tau^2, relative to the observed score variance of the sample mean is a reliability. A reliability close to 1 puts more weight on the cluster mean while a reliability close to 0 put more weight on the grand mean.

Usage

reliability(model)

Arguments

model

A model produced using the lme4::lmer() or lme4::glmer() functions. This is an object of class merMod and subclass lmerMod or glmerMod.

Value

A list with reliability estimates for each random effect

References

Snijders TAB, Bosker RJ (2012). Multilevel Analysis. SAGE. ISBN 9781849202015.

Raudenbush SW, Bryk AS (2002). Hierarchical Linear Models: Applications and Data Analysis Methods. SAGE. ISBN 9780761919049.

Examples


# lmer model
fit <- lme4::lmer(mathach ~ 1 + ses + catholic + (1 + ses|id),
data=hsb, REML=TRUE)

reliability(fit)



[Package mlmhelpr version 0.1.1 Index]