Learn R Programming

HLMdiag (version 0.5.0)

rvc.default: Relative variance change for HLMs

Description

This function calculates the relative variance change (RVC) of hierarchical linear models fit via lmer.

Usage

# S3 method for default
rvc(object, ...)

# S3 method for mer rvc(object, level = 1, delete = NULL, ...)

# S3 method for lmerMod rvc(object, level = 1, delete = NULL, ...)

# S3 method for lme rvc(object, level = 1, delete = NULL, ...)

Arguments

object

fitted object of class mer or lmerMod

...

do not use

level

variable used to define the group for which cases will be deleted. If level = 1 (default), then individual cases will be deleted.

delete

index of individual cases to be deleted. To delete specific observations the row number must be specified. To delete higher level units the group ID and group parameter must be specified. If delete = NULL then all cases are iteratively deleted.

Value

If delete = NULL a matrix with columns corresponding to the variance components of the model and rows corresponding to the deleted observation/group is returned.

If delete is specified then a named vector is returned.

The residual variance is named sigma2 and the other variance components are named D** where the trailing digits give the position in the covariance matrix of the random effects.

References

Dillane, D. (2005) Deletion Diagnostics for the Linear Mixed Model. Ph.D. thesis, Trinity College Dublin

See Also

leverage.mer, cooks.distance.mer, mdffits.mer, covratio.mer, covtrace.mer