Learn R Programming

snm (version 1.20.0)

snm.fitted: Extract fitted values from an snm object

Description

Computes fitted values under models used in snm normalization.

Usage

snm.fitted(object, ...) "fitted"(object, ...)

Arguments

object
Output from the snm function.
...
Not used.

Value

fit0
Linear model fits when regressing each probe's normalized data on the null model, ~adj.var.
fit1
Linear model fits when regressing each probe's normalized data on the full model, ~adj.var+bio.var.

Details

Returns the fitted values under the "null model" (adjustment variables only) and the "full model" (adjustment variables + biological variables).

References

Mecham BH, Nelson PS, Storey JD (2010) Supervised normalization of microarrays. Bioinformatics, 26: 1308-1315.

See Also

snm, sim.singleChannel

Examples

Run this code
## Not run: 
# singleChannel <- sim.singleChannel(12345)
# snm.obj <- snm(singleChannel$raw.data,
# 		      singleChannel$bio.var,
# 		      singleChannel$adj.var[,-6],
# 		      singleChannel$int.var, num.iter=10)
# snm.fit = fitted(snm.obj)
# res1 = snm.obj$norm.dat - snm.fit$fit1
# snm.svd = fast.svd(res1)
# cor(snm.svd$v[,1], singleChannel$adj.var[,6])
# plot(snm.svd$v[,1], singleChannel$adj.var[,6])
# ## End(Not run)

Run the code above in your browser using DataLab