Learn R Programming

VCA (version 1.3.4)

getVCvar: Covariance-Matrix of Variance Components.

Description

Function getVCvar determines the covariance matrix of ANOVA-type estimates of variance components (VC) according to the method given in the reference.

Usage

getVCvar(Ci, B, Z, VC)

Arguments

Ci

(matrix) inverted C-matrix of coefficients equating observed Sum of Squares (SS) to expected values.

B

(list) of B-matrices representing orthogonal basis of Z*Z', where Z is the design matrix of a certain term in the model formula

Z

(list) of Z-matrices, the design matrices assigning random effects to observations for each variance component.

VC

(numeric) vector of variance components, i.e. sigma^2.

Value

(matrix) covariance matrix of estimated variance components

Details

This function implements the (exact) method for computing the variance-covariance matrix of variance components obtained emplyoing ANOVA-type estimation of unbalance data, described in Searle et al. (1992) "Variance Components", Wiley, p.176. One feature of this method is that the asymptotic covariance matrix of VCs produced by SAS PROC MIXED (method=type1) (inverse of the Fisher-Information matrix) is equal to the one computed here, in case of balanced designs (data). For unbalanced designs, both matrices are likely to differ.

It is for internal use only, thus, not exported.

References

Searle, S.R, Casella, G., McCulloch, C.E. (1992), Variance Components, Wiley New York

See Also

getBasis

Examples

Run this code
# NOT RUN {
data(dataEP05A2_3)
res <- anovaVCA(y~day/run, dataEP05A2_3, SSQ.method="qf")
res
mat <- res$Matrices
Var <- VCA:::getVCvar(Ci=mat$Ci.SS, A=mat$A, Z=mat$Z, VC=res$aov.tab[-1,"VC"])
round(Var, 12)
# }

Run the code above in your browser using DataLab