mkVarCorr: Make Variance and Correlation Components of Covariance

View source: R/VarCorr.R

mkVarCorrR Documentation

Make Variance and Correlation Components of Covariance

Description

Computes from reCovs the variance and correlation components of random effect covariance matrices.

Usage

mkVarCorr(sc, cnms, nc = lengths(cnms, use.names = FALSE),
          theta, nms = names(cnms), reCovs = NULL, relReCovs = TRUE)

Arguments

sc

a numeric vector of length 1 giving the residual standard deviation for LMMs. Set to NULL for GLMMs.

cnms

a list of character vectors giving component dimnames, used only to determine nc and nms if those are missing.

nc

an integer vector giving component dimensions (number of columns).

theta

a numeric vector giving covariance parameters (lower triangular entries of relative Cholesky factors in column-major order), used only to determine reCovs when that is missing.

nms

a character vector giving component names.

reCovs

a list of Covariance objects.

relReCovs

a logical indicating if the components of reCovs represent relative covariance matrices (in which case they are scaled by sc^2).

Value

A list of matrices.

See Also

VarCorr.


lme4 documentation built on March 6, 2026, 1:07 a.m.