corrRanef: Correction of predicted random effects

View source: R/corrRanef.R

corrRanefR Documentation

Correction of predicted random effects

Description

The function computes the corrected predicted random effects as presented in Carpenter, Goldstein and Rasbash (2003) in Section 3.2 to avoid the problem of underdispersion of residual bootstrap distributions.

Usage

corrRanef(model)

Arguments

model

lmer object.

Value

a list of corrected predicted random effects (of the same form as ranef(model)).

Author(s)

Tomasz Zadlo

References

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.

Examples

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

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

Related to corrRanef in qape...