Sets up an EMSC model to be applied to one or more set of spectra.
EMSC_model(x, reference = NA, degree = 2, interferent = NULL,
constituent = NULL, weights = NULL, replicates = NULL, rep_corr = 0.9)numeric vector containing abcissas of spectra to be corrected or matrix to be
corrected with/without names colnames.
numeric vector containing the reference spectrum.
integer giving the polynomial degree of the baseline; 0 or higher, default = 2.
numeric vector containing a spectral component to remove.
numeric vector containing a spectral component to include.
numeric vector of abcissas weights.
optional vector which identifies replicates. Default = NULL,
meaning no replicate correctio will be performed.
proportion of variance or number of subspace components in replicate space (default = 0.9).
An EMSC model is returned containing all parameters.