baseline.irls: Iterative Restricted Least Squares

View source: R/baseline.irls.R

baseline.irlsR Documentation

Iterative Restricted Least Squares

Description

An algorithm with primary smoothing and repeated baseline suppressions and regressions with 2nd derivative constraint

Usage

baseline.irls(spectra, lambda1 = 5, lambda2 = 9, maxit = 200, wi = 0.05)

Arguments

spectra

Matrix with spectra in rows

lambda1

2nd derivative constraint for primary smoothing

lambda2

2nd derivative constraint for secondary smoothing

maxit

Maximum number of iterations

wi

Weighting of positive residuals

Value

baseline

Matrix of baselines corresponding to spectra spectra

corrected

Matrix of baseline corrected spectra

smoothed

Matrix of primary smoothed spectra

Author(s)

Kristian Hovde Liland and Bjørn-Helge Mevik

Examples

data(milk)
bc.irls <- baseline(milk$spectra[1,, drop=FALSE], method='irls')
## Not run: 
	plot(bc.irls)

## End(Not run)

baseline documentation built on Nov. 18, 2023, 5:14 p.m.