Robust Baseline Estimation
Wrapper for Andreas F. Ruckstuhl, Matthew P. Jacobson, Robert W. Field, James A. Dodd's algorithm based on LOWESS and weighted regression
baseline.rfbaseline(spectra, span = 2/3, NoXP = NULL, maxit = c(2, 2), b = 3.5, weight = NULL, Scale = function(r) median(abs(r))/0.6745, delta = NULL, SORT = FALSE, DOT = FALSE, init = NULL)
spectra |
Matrix with spectra in rows |
span |
Amount of smoothing (by fraction of points) |
NoXP |
Amount of smoothing (by number of points) |
maxit |
Maximum number of iterations in robust fit |
b |
Tuning constant in the biweight function |
weight |
Optional weights to be given to individual observations |
Scale |
S function specifying how to calculate the scale of the residuals |
delta |
Nonnegative parameter which may be used to save computation. (See |
SORT |
Boolean variable indicating whether x data must be sorted. |
DOT |
Disregard outliers totally (boolean) |
init |
Values of initial fit |
Most of the code is the original code as given by the authors. The ability to sort by X-values has been removed and ability to handle multiple spectra has been added
baseline |
Matrix of baselines corresponding to spectra |
corrected |
Matrix of baseline corrected spectra |
Kristian Hovde Liland and Bjørn-Helge Mevik
Andreas F. Ruckstuhl, Matthew P. Jacobson, Robert W. Field, James A. Dodd: Baseline subtraction using robust local regression estimation
data(milk) bc.rbe <- baseline(milk$spectra[1,, drop=FALSE], method='rfbaseline', span=NULL, NoXP=1000) ## Not run: plot(bc.rbe) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.