vcov.lmm: Extract The Variance-Covariance Matrix From a Linear Mixed...

View source: R/vcov.R

vcov.lmmR Documentation

Extract The Variance-Covariance Matrix From a Linear Mixed Model

Description

Extract the variance-covariance matrix of the model coefficients of a linear mixed model.

Usage

## S3 method for class 'lmm'
vcov(
  object,
  effects = "mean",
  robust = FALSE,
  df = FALSE,
  strata = NULL,
  data = NULL,
  p = NULL,
  type.information = NULL,
  transform.sigma = NULL,
  transform.k = NULL,
  transform.rho = NULL,
  transform.names = TRUE,
  ...
)

Arguments

object

a lmm object.

effects

[character] Should the variance-covariance matrix for all coefficients be output ("all"), or only for coefficients relative to the mean ("mean" or "fixed"), or only for coefficients relative to the variance structure ("variance"), or only for coefficients relative to the correlation structure ("correlation").

robust

[logical] Should robust standard errors (aka sandwich estimator) be output instead of the model-based standard errors. Not feasible for variance or correlation coefficients estimated by REML.

df

[logical] Should degree of freedom, computed using Satterthwaite approximation, for the model parameters be output.

strata

[character vector] When not NULL, only output the variance-covariance matrix for the estimated parameters relative to specific levels of the variable used to stratify the mean and covariance structure.

data

[data.frame] dataset relative to which the information should be computed. Only relevant if differs from the dataset used to fit the model.

p

[numeric vector] value of the model coefficients at which to evaluate the information. Only relevant if differs from the fitted values.

type.information

[character] Should the expected information be used (i.e. minus the expected second derivative) or the observed inforamtion (i.e. minus the second derivative).

transform.sigma

[character] Transformation used on the variance coefficient for the reference level. One of "none", "log", "square", "logsquare" - see details.

transform.k

[character] Transformation used on the variance coefficients relative to the other levels. One of "none", "log", "square", "logsquare", "sd", "logsd", "var", "logvar" - see details.

transform.rho

[character] Transformation used on the correlation coefficients. One of "none", "atanh", "cov" - see details.

transform.names

[logical] Should the name of the coefficients be updated to reflect the transformation that has been used?

...

Not used. For compatibility with the generic method.

Details

For details about the arguments transform.sigma, transform.k, transform.rho, see the documentation of the coef.lmm function.

Value

A matrix with an attribute "df" when argument df is set to TRUE.


LMMstar documentation built on Nov. 9, 2023, 1:06 a.m.