coef: Extract Coefficients From a Linear Mixed Model

Description Usage Arguments Details Value Examples

Description

Extract coefficients from a linear mixed model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'lmm'
coef(
  object,
  effects = NULL,
  strata = NULL,
  transform.sigma = "none",
  transform.k = "none",
  transform.rho = "none",
  transform.names = TRUE,
  ...
)

Arguments

object

a lmm object.

effects

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

strata

[character vector] When not NULL, only output coefficient relative to specific levels of the variable used to stratify the mean and covariance structure.

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

transform.sigma:

transform.k:

transform.rho:

Value

A vector with the value of the model coefficients.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## simulate data in the long format
set.seed(10)
dL <- sampleRem(100, n.times = 3, format = "long")

## fit linear mixed model
eUN.lmm <- lmm(Y ~ X1 + X2 + X5, repetition = ~visit|id, structure = "UN", data = dL, df = FALSE)

## output coefficients
coef(eUN.lmm)
coef(eUN.lmm, effects = "mean")
coef(eUN.lmm, transform.sigma = "none", transform.k = "none", transform.rho = "none")

LMMstar documentation built on Nov. 5, 2021, 1:07 a.m.