Learn R Programming

lavaSearch2 (version 1.0.0)

getVarCov2: Reconstruct the Marginal Variance Covariance Matrix from a nlme Model

Description

Reconstruct the marginal variance covariance matrix from a nlme model.

Usage

.getVarCov2(object, ...)

# S3 method for gls .getVarCov2(object, param, attr.param, endogenous, name.endogenous, n.endogenous, cluster, n.cluster, ...)

# S3 method for lme .getVarCov2(object, param, attr.param, endogenous, name.endogenous, n.endogenous, cluster, n.cluster, ...)

Arguments

object

a gls or lme object

...

[internal] Only used by the generic method.

param

the mean and variance parameters.

attr.param

the type of each parameter (mean or variance).

endogenous

the endogenous variable to which each observation corresponds.

name.endogenous

the name of the endogenous variables.

n.endogenous

the number of endogenous variables.

cluster

the grouping variable relative to which the observations are iid.

n.cluster

the number of groups.

Details

The marginal variance covariance matrix for gls model is of the form:

\(\Sigma =\) \(\sigma^2\) \(\sigma^2 \sigma_2 \rho_{1,2}\) \(\sigma^2 \sigma_3 \rho_{1,3}\)
. \(\sigma^2 \sigma_2^2\) \(\sigma^2 \sigma_3 \rho_{1,3}\)

The marginal variance covariance matrix for lme model is of the form: