vcovSqrt | R Documentation |
dream()
fitDefine generic vcovSqrt()
for result of lmFit()
and dream()
vcovSqrt(object, vobj, coef, approx = TRUE)
## S4 method for signature 'MArrayLM'
vcovSqrt(object, vobj, coef, approx = TRUE)
## S4 method for signature 'MArrayLM2'
vcovSqrt(object, vobj, coef, approx = TRUE)
object |
|
vobj |
|
coef |
name of coefficient to be extracted |
approx |
use fast approximation |
Computes factor of covariance matrix so that vcov(object)
is the same as crossprod(vcovSqrt(object))
# 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, ]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.