whittaker | R Documentation |
Baseline correction based on asymmetric least squares (ALS) algorithm as proposed by Eilers et al. (2005).
whittaker(x, lambda = 1000, p = 0.001, max.iter = 10)
x |
A numeric matrix or data frame. |
lambda |
A numeric value specifying the smoothing parameter, which controls the amount of curvature allowed for the baseline. The smaller the lambda, the more curvature in the baseline fitting. Default is 1000. |
p |
A numeric value specifying the extent of asymmetry required of the
fit. Larger values allow more negative-going regions. Smaller values disallow
negative-going regions. |
max.iter |
Maximum number of iterations for the algorithm. Default is 10. |
The function applies Eilers' method based on a Whittaker filter. The algorithm estimates a baseline curve by minimizing the asymmetric least squares criterion, which allows for different weights for positive and negative residuals. The resulting baseline curve is subtracted from the input data, providing a baseline-corrected version.
A list containing two tibbles:
correction
: The baseline-corrected spectral matrix.
background
: The fitted background emission.
Christian L. Goueguel
Eilers, P.H.C., Boelens, H.F.M., (2005). Baseline correction with asymmetric least squares smoothing. Leiden University Medical Centre report.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.