errorVar {skewlmm}R Documentation

Error scale matrix associated with times

Description

It returns a scale matrix associated with the error term at time times. Can be applied to a smn.lmm or smsn.lmm object or to a specific dependence structure with chosen parameter values.

Usage

errorVar(times, object = NULL, sigma2 = NULL, depStruct = NULL,
    phi = NULL)

Arguments

times

A vector containing the times for which the matrix should be calculated.

object

A smn.lmm or smsn.lmm object for which the variance should be extracted.

sigma2

Common variance parameter, such that \Sigma = sigma2*R. Only evaluated if object is.null(object).

depStruct

Dependence structure. "UNC" for conditionally uncorrelated ("CI" is also accepted), "ARp" for AR(p) – p is length(phi)–, "CS" for compound symmetry, "DEC" for DEC, and "CAR1" for continuous-time AR(1). Only evaluated if object is.null(object).

phi

Parameter vector indexing the dependence structure. Only evaluated if object is.null(object).

Value

Matrix of dimension length(times).

Author(s)

Fernanda L. Schumacher, Larissa A. Matos and Victor H. Lachos

References

Schumacher, F. L., Lachos, V. H., and Matos, L. A. (2021). Scale mixture of skew-normal linear mixed models with within-subject serial dependence. Statistics in Medicine 40(7), 1790-1810.

See Also

smsn.lmm, smn.lmm

Examples


fm1 = smsn.lmm(distance ~ age+Sex, data=nlme::Orthodont, groupVar="Subject")
errorVar(times=1:4,fm1)
#
errorVar(times=1:5, sigma2=1, depStruct="ARp", phi=.5)
errorVar(times=1:5, sigma2=1, depStruct="DEC", phi=c(.5,.8))

[Package skewlmm version 1.1.0 Index]