Learn R Programming

nlmm (version 1.1.1)

VarCorr.nlmm: Extract Variance-Covariance Matrix

Description

This function extracts the variance-covariance matrix of the random effects from a fitted nlmm object.

Usage

# S3 method for nlmm
VarCorr(x, sigma = NULL, ...)

Arguments

x

an object of class "nlmm".

sigma

not used.

...

not used.

Author

Marco Geraci

Details

This function returns the variance or the variance-covariance matrix of the random effects. The generic function VarCorr is imported from the nlme package (Pinheiro et al, 2014).

References

Pinheiro J, Bates D, DebRoy S, Sarkar D and R Core Team (2014). nlme: Linear and Nonlinear Mixed Effects Models. R package version 3.1-117, https://CRAN.R-project.org/package=nlme.

See Also

nlmm

Examples

Run this code
if (FALSE) {
data(rats)
fit <- nlmm(y ~ trt*time, random = ~ time, group = id, data = rats, cov = "pdSymm",
control = nlmmControl(multistart = FALSE))

# Symmetric variance-covariance of random intercepts and slopes
VarCorr(fit)
}

Run the code above in your browser using DataLab