fitted.snm: Extract fitted values from an snm object

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/fitted.snm.R

Description

Computes fitted values under models used in snm normalization.

Usage

1
2
3
snm.fitted(object, ...)
## S3 method for class 'snm'
fitted(object, ...)

Arguments

object

Output from the snm function.

...

Not used.

Details

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

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.

Note

These fits are useful for investigating the quality of the study-specific model used in the normalization. For example, the residuals can be obtained from the full model fit and examined for latent structure.

Author(s)

John D. Storey <jstorey@princeton.edu>

References

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

See Also

snm, sim.singleChannel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

snm documentation built on Nov. 8, 2020, 8:11 p.m.