Description Usage Arguments Value Author(s) Examples
This function removes all effects due to probe-specific adjustment variables.
1 | construct.normalized.data(snm.obj)
|
snm.obj |
An object of class snm. |
Updated snm.obj.
Brig Mecham <brig.mecham@sagebase.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function(snm.obj) {
dat = snm.obj$dat
n = snm.obj$n.arrays
xx0 = snm.obj$adj.var
df0 = snm.obj$df.null
xx1 = cbind(snm.obj$adj.var, snm.obj$bio.var)
P1 = solve(t(xx1) %*% xx1) %*% t(xx1)
cfs1 = t(P1 %*% t(dat))
res1 = dat - cfs1 %*% t(xx1)
x1 <- cbind(rep(1,dim(dat)[2]), snm.obj$bio.var)
cfs2 <- cfs1[, -(2:ncol(adj.var))]
fit1 <- cfs2 %*% t(x1)
snm.obj$dat <- fit1 + res1
snm.obj
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.