EmpCM: Empirical covariance matrix of predicted random effects

View source: R/EmpCM.R

EmpCMR Documentation

Empirical covariance matrix of predicted random effects

Description

A list of empirical covariance matrices of predicted random effects, where the length of the list equals the number of grouping variables used to define random effects as described in Carpenter, Goldstein and Rasbash (2003) in Section 3.2 and in Thai et al. (2013) in Section 2.3.3.

Usage

EmpCM(model)

Arguments

model

lmer object.

Value

a list of empirical covariance matrices of predicted random effects.

Author(s)

Tomasz Zadlo

References

1. Carpenter, J.R., Goldstein, H. and Rasbash, J. (2003), A novel bootstrap procedure for assessing the relationship between class size and achievement. Journal of the Royal Statistical Society: Series C (Applied Statistics), 52, 431-443.

2. Thai, H.-T., Mentre, F., Holford, N.H., Veyrat-Follet, C. and Comets, E. (2013), A comparison of bootstrap approaches for estimating uncertainty of parameters in linear mixed-effects models. Pharmaceutical Statistics, 12, 129-140.

Examples

library(lme4)
data(invData)
attach(invData)
model <- lmer(investments ~ newly_registered + ((1|NUTS2) + 
((newly_registered - 1)|NUTS2) + ((newly_registered)|NUTS4)))
EmpCM(model)
detach(invData)

qape documentation built on Aug. 21, 2023, 5:07 p.m.

Related to EmpCM in qape...