baseline.irls: Iterative Restricted Least Squares

Description Usage Arguments Value Author(s) Examples

View source: R/baseline.irls.R

Description

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

Usage

1
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<f8>rn-Helge Mevik

Examples

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

## End(Not run)

Example output

Attaching package: 'baseline'

The following object is masked from 'package:stats':

    getCall

baseline documentation built on May 30, 2017, 1:23 a.m.