Learn R Programming

tramME (version 0.0.1)

vcov.LmME: Get the variance-covariance matrix of the parameters of an LmME model

Description

pargroup = "baseline" is not available for LmME objects.

Usage

# S3 method for LmME
vcov(object, as.lm = FALSE, parm = NULL,
  pargroup = c("all", "fixef", "shift", "baseline", "ranef"),
  pmatch = FALSE, ...)

Arguments

object

A fitted LmME object.

as.lm

If TRUE, return the covariance matrix of the transformed parameters as in a lmerMod object.

parm

The indeces or names of the parameters of interest. See in details.

pargroup

fixef: fixed-effects, shift: shift parameters, all: fixed effects and variance component parameters, baseline: parameters of the baseline transformation function, ranef: variance components parameters.

pmatch

Logical. If TRUE, partial name matching is allowed.

...

Optional arguments

Value

A numeric covariance matrix.

Examples

Run this code
# NOT RUN {
data("sleepstudy", package = "lme4")
fit <- LmME(Reaction ~ Days + (Days | Subject), data = sleepstudy)
vcov(fit) ## transformation model parametrization
vcov(fit, as.lm = TRUE) ## LMM parametrization
## cov of coefficient AND other terms with 'Days' in names
vcov(fit, as.lm = TRUE, parm = "Days", pmatch = TRUE)
vcov(fit, as.lm = TRUE, parm = "^Days", pmatch = TRUE) ## var of coefficient only
vcov(fit, as.lm = TRUE, pargroup = "fixef") ## cov of fixed effects
# }

Run the code above in your browser using DataLab