varcov<-.tramME {tramME}R Documentation

Set the values of the random effects covariance matrices of a tramME model.

Description

Sets the list containing the covariance matrices of a tramME model. The matrices have to be positive definite. Just as in "coef<-", when the function is called on a fitted object, it will be set to unfitted.

Usage

## S3 replacement method for class 'tramME'
varcov(object) <- value

Arguments

object

A tramME object (fitted or unfitted).

value

A list of positive definite covariance matrices.

Details

The supplied list does not have to be named, and the names will be ignored. When multiple grouping factors are present, the function assumes the same order as in the object to be modified. Hence, it might be a good idea to call varcov first, and modify this list to make sure that the input has the right structure.

Value

An unfitted tramME object with the new coefficient values.

Examples

data("sleepstudy", package = "lme4")
mod <- LmME(Reaction ~ Days + (Days | Subject), data = sleepstudy, nofit = TRUE)
vc <- varcov(mod)
vc[[1]] <- matrix(c(1, 0, 0, 2), ncol = 2)
varcov(mod) <- vc

[Package tramME version 0.0.3 Index]