prep.msc {mdatools} | R Documentation |
Multiplicative Scatter Correction transformation
Description
Applies Multiplicative Scatter Correction (MSC) transformation to data matrix (spectra)
Usage
prep.msc(data, mspectrum = NULL)
Arguments
data |
a matrix with data values (spectra) |
mspectrum |
mean spectrum (if NULL will be calculated from |
Details
MSC is used to remove scatter effects (baseline offset and slope) from spectral data, e.g. NIR spectra.
@examples
### Apply MSC to spectra from simdata
library(mdatools) data(simdata)
spectra = simdata$spectra.c cspectra = prep.msc(spectra)
par(mfrow = c(2, 1)) mdaplot(spectra, type = "l", main = "Before MSC") mdaplot(cspectra, type = "l", main = "After MSC")
Value
preprocessed spectra (calculated mean spectrum is assigned as attribut 'mspectrum')
[Package mdatools version 0.14.1 Index]