lmerSummary: Derive VCA-Summary Table from an Object Fitted via Function...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/vca.R

Description

This function builds a variance components analysis (VCA) table from an object representing a model fitted by function lmer of the lme4 R-package.

Usage

1
2
lmerSummary(obj, VarVC = TRUE, terms = NULL, Mean = NULL, cov = FALSE,
  X = NULL, tab.only = FALSE)

Arguments

obj

(lmerMod) object as returned by function lmer

VarVC

(logical) TRUE = the variance-covariance matrix of variance components will be approximated following the Giesbrecht & Burns approach, FALSE = it will not be approximated

terms

(character) vector, optionally defining the order of variance terms to be used

Mean

(numeric) mean value used for CV-calculation

cov

(logical) TRUE = in case of non-zero covariances a block diagonal matrix will be constructed, FALSE = a diagonal matrix with all off-diagonal elements being equal to zero will be contructed

X

(matrix) design matrix of fixed effects as constructed to meet VCA-package requirements

tab.only

(logical) TRUE = will return only the VCA-results table as 'data.frame', argument 'VarVC' will automatically set to 'FALSE' (see details)

Details

It applies the approximation of the variance-covariance matrix of variance components according to Giesbrecht & Burns (1985) and uses this information to approximate the degrees of freedom according to Satterthwaite (see SAS PROC MIXED documentation option 'CL').

This function can be used to create a VCA-results table from almost any fitted 'lmerMod'-object, i.e. one can apply it to a model fitted via function lmer of the lme4-package. The only additional argument that needs to be used is 'tab.only' (see examples).

Value

(list) still a premature 'VCA'-object but close to a "complete" 'VCA'-object

Author(s)

Andre Schuetzenmeister [email protected]

References

Searle, S.R, Casella, G., McCulloch, C.E. (1992), Variance Components, Wiley New York

Giesbrecht, F.G. and Burns, J.C. (1985), Two-Stage Analysis Based on a Mixed Model: Large-Sample Asymptotic Theory and Small-Sample Simulation Results, Biometrics 41, p. 477-486

See Also

remlVCA, remlMM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# fit a model with a VCA-function first
data(VCAdata1)
fit0 <- remlVCA(y~(device+lot)/day/run, subset(VCAdata1, sample==5))
fit0

# fit the same model with function 'lmer' of the 'lme4'-package
library(lme4)
fit1 <- lmer(y~(1|device)+(1|lot)+(1|device:lot:day)+(1|device:lot:day:run),
             subset(VCAdata1, sample==5))
lmerSummary(fit1, tab.only=TRUE)

## End(Not run)

VCA documentation built on July 12, 2017, 5:02 p.m.

Related to lmerSummary in VCA...