msc

0th

Percentile

Multiplicative Scatter Correction

Performs multiplicative scatter/signal correction on a data matrix.

Keywords
multivariate, regression
Usage
msc(X, reference = NULL)
# S3 method for msc
predict(object, newdata, …)
# S3 method for msc
makepredictcall(var, call)
Arguments
X, newdata

numeric matrices. The data to scatter correct.

reference

numeric vector. Spectre to use as reference. If NULL, the column means of X are used.

object

an object inheriting from class "msc", normally the result of a call to msc with a single matrix argument.

var

A variable.

call

The term in the formula, as a call.

other arguments. Currently ignored.

Details

makepredictcall.msc is an internal utility function; it is not meant for interactive use. See makepredictcall for details.

Value

Both msc and predict.msc return a multiplicative scatter corrected matrix, with attribute "reference" the vector used as reference spectre. The matrix is given class c("msc", "matrix"). For predict.msc, the "reference" attribute of object is used as reference spectre.

References

Martens, H., N<U+00E6>s, T. (1989) Multivariate calibration. Chichester: Wiley.

See Also

mvr, pcr, plsr, stdize

Aliases
  • msc
  • predict.msc
  • makepredictcall.msc
Examples
# NOT RUN {
data(yarn)
## Direct correction:
Ztrain <- msc(yarn$NIR[yarn$train,])
Ztest <- predict(Ztrain, yarn$NIR[!yarn$train,])

## Used in formula:
mod <- plsr(density ~ msc(NIR), ncomp = 6, data = yarn[yarn$train,])
pred <- predict(mod, newdata = yarn[!yarn$train,]) # Automatically scatter corrected
# }
Documentation reproduced from package pls, version 2.7-2, License: GPL-2

Community examples

Looks like there are no examples yet.