Reconstruct the marginal variance covariance matrix from a nlme model.
.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, ...)
a gls or lme object
[internal] Only used by the generic method.
the mean and variance parameters.
the type of each parameter (mean or variance).
the endogenous variable to which each observation corresponds.
the name of the endogenous variables.
the number of endogenous variables.
the grouping variable relative to which the observations are iid.
the number of groups.
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: