baseline(spect, init.bd, sm.par = 1e-11, sm.ord = 2, max.iter = 20, tol = 5e-8, sm.div = NA, sm.norm.by = c("baseline", "overestimate", "constant"), neg.div = NA, neg.norm.by = c("baseline", "overestimate", "constant"), rel.conv.crit = TRUE, zero.rm = TRUE, halve.search = FALSE)iter containing the number of indicator variables that switched value on each iterationiter containing the number of halving line-searches done on each iterationhalve.search == TRUE) using starting value
b[i] = init.bd[i] for all $i$. The middle term controls the
smoothness of the baseline and the last term applies a negativity
penalty when the baseline is above the spectrum.The smoothing factor sm.par corresponds to $A[1]^{*}$ in
Barkauskas (2009) and controls how large the estimated nth derivative of
the baseline is allowed to be (for sm.ord = n). From a practical
standpoint, values of sm.ord larger than two do not seem to adequately
smooth the baseline because the Hessian becomes computationally singular for any
reasonable value of sm.par.
The parameters sm.div, sm.norm.by, neg.div, and
neg.norm.by determine the methods used to normalize the smoothness and
negativity terms. The general forms are
$A[1,i] = n^4 * A[1]^{*}/M[i]/p$ and
$A[2,i] = 1/M[i]/p$. Here, n = length(spect);
$p$ is sm.div or neg.div, as appropriate; and
$M[i]$ is determined by sm.norm.by or neg.norm.by, as
appropriate. Values of "baseline" make
$M[i] = b[i]'$, where $b[i]'$ is the currently
estimated value of the baseline; values of "overestimate" make
$M[i] = b[i]'-y[i]$; and values of "constant"
make $M[i] = \sigma$, where $\sigma$ is an estimate of
the noise standard deviation.
The values of sm.norm.by and neg.norm.by can be abbreviated and
both have default value "baseline". The default values of NA for
sm.div and neg.div are translated by default to
sm.div = 0.5223145 and neg.div = 0.4210109, which are the
appropriate parameters for the FT-ICR mass spectrometry machine that generated
the spectra which were used to develop this package. It is distinctly possible
that other machines will require different parameters, and almost certain that
other spectroscopic technologies will require different parameters; see
Barkauskas (2009a) for a description for how these parameters were obtained.
If zero.rm == TRUE and $y[a],\dots,y[a+k] = 0$,
then these values of the spectrum are set to be
$(y[a-1]+y[a+k+1])/2$. (For typical MALDI FT-ICR
spectra, a spectrum value of zero indicates an erased harmonic and should not be
considered a real data point.)
Barkauskas, D.A. et al. (2009b) Analysis of MALDI FT-ICR mass spectrometry data: A time series approach. Analytica Chimica Acta, 648:2, 207--214.
Barkauskas, D.A. et al. (2009c) Detecting glycan cancer biomarkers in serum samples using MALDI FT-ICR mass spectrometry data. Bioinformatics, 25:2, 251--257.
Xi, Y. and Rocke, D.M. (2008) Baseline Correction for NMR Spectroscopic Metabolomics Data Analysis. BMC Bioinformatics, 9:324.
run.baselines