constructNormalizedData: Construct Normalized Data

Description Usage Arguments Value Author(s) Examples

Description

This function removes all effects due to probe-specific adjustment variables.

Usage

1

Arguments

snm.obj

An object of class snm.

Value

Updated snm.obj.

Author(s)

Brig Mecham <brig.mecham@sagebase.org>

Examples

 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
  }

Sage-Bionetworks/snm documentation built on May 9, 2019, 12:14 p.m.