Learn R Programming

crmn (version 0.0.8)

normPred: Predict for normalization...

Description

Predict for normalization

Usage

normPred(normObj, newdata, factors, lg=TRUE, ...)

Arguments

normObj
the result from normFit
newdata
an ExpressionSet or a matrix (in which case the standards must be passed on via ...), possibly the same as used to fit the normalization model in order to get the fitted data.
factors
column names in the pheno data slot describing the biological factors. Or a design matrix.
lg
logical indicating that the data should be log transformed
...
passed on to standardsPred, standardsFit, standards, analytes

Value

  • the normalized data

Details

Predict the normalized data using a previously fitted normalization model.

Apply fitted normalization parameters to new data to get normalized data. Current can not only handle matrices as input for methods 'RI' and 'one'.

See Also

normFit

Examples

Run this code
data(mix)
nfit <- normFit(mix, "crmn", factor="type", ncomp=3)
normedData <- normPred(nfit, mix, "type")
slplot(pca(t(log2(exprs(normedData)))), scol=as.integer(mix$type))
## same thing
Y <- exprs(mix)
G <- model.matrix(~-1+mix$type)
isIS <- fData(mix)$tag == 'IS'
nfit <- normFit(Y, "crmn", factors=G, ncomp=3, standards=isIS)
normedData <- normPred(nfit, Y, G, standards=isIS)
slplot(pca(t(log2(normedData))), scol=as.integer(mix$type))

Run the code above in your browser using DataLab