Usage
vcovSqrt(object, vobj, coef, approx = TRUE)
# S4 method for MArrayLM
vcovSqrt(object, vobj, coef, approx = TRUE)
# S4 method for MArrayLM2
vcovSqrt(object, vobj, coef, approx = TRUE)
Value
Computes factor of covariance matrix so that vcov(object)
is the same as crossprod(vcovSqrt(object))
Examples
# load simulated data:
# geneExpr: matrix of *normalized* gene expression values
# info: information/metadata about each sample
data(varPartData)
form <- ~Batch
fit <- dream(geneExpr[1:2, ], form, info)
fit <- eBayes(fit)
# Compute covariance directly
Sigma <- vcov(fit, geneExpr[1:2, ])
# Compute factor of covariance
S <- crossprod(vcovSqrt(fit, geneExpr[1:2, ]))