Skip to contents

Univariate filtering

Functions used to assess individual variables or features independently.

zscore()
Classical or Robust Z-Score
iqr_outliers()
Interquartile Range Method
directional_outlyingness()
Directional Outlyingness for Skewed Distribution

Multivariate filtering

robust PCA

Principal component analysis that resists outlying observations (and, for MacroPCA and cellPCA, outlying cells and missing values).

robpca()
Robust Principal Component Analysis (ROBPCA)
rospca()
Robust Sparse Principal Component Analysis (ROSPCA)
macropca()
Robust PCA for Cellwise and Casewise Outliers (MacroPCA)
cellpca()
Robust PCA by Casewise and Cellwise Weighting (cellPCA)
predict(<specproc_macropca>) predict(<specproc_cellpca>) predict(<specproc_robpca>)
Scores and Distances of New Observations
plot_outlier_map()
Outlier Map of a Robust PCA or Robust PLS Model
plot_cell_map()
Cell Map of a MacroPCA or cellPCA Fit
flagged_regions()
Flagged Regions of a MacroPCA or cellPCA Fit

self-organizing maps

Nonlinear maps of the spectra onto a grid of prototype spectra, for sorting samples and flagging novel ones.

som()
Self-Organizing Map of Spectra
predict(<specproc_som>)
Map New Spectra onto a Self-Organizing Map
plot_som()
Plot a Self-Organizing Map
som_stability()
Stability of a Self-Organizing Map

orthogonalization methods

Functions used to identify and remove unwanted covariance structures and sources of variance from the multivariate data.

epo()
External Parameter Orthogonalization
osc()
Orthogonal Signal Correction
opls()
Orthogonal Projections to Latent Structures
predict(<specproc_opls>)
Predict with an OPLS Model
o2pls()
Modified Orthogonal Projections to Latent Structures
direct_osc()
Direct Orthogonal Signal Correction
projected_osc()
Projected Orthogonal Signal Correction
y_gradient_glsw()
y-Gradient Generalized Least Squares Weighting
direct_orthogonal()
Direct Orthogonalization
predict(<specproc_epo>) predict(<specproc_osc>) predict(<specproc_direct_orthogonal>) predict(<specproc_direct_osc>) predict(<specproc_projected_osc>) predict(<o2pls>)
Apply an Orthogonalization Filter to New Spectra

robust PLS and PCR regression, wavelength selection

Robust PLS and principal component regression that resist outlying spectra and wrong reference values, their robust cross-validation, and the selection of the informative wavelengths (VIP, selectivity ratio, interval PLS).

rsimpls()
Robust Partial Least Squares Regression (RSIMPLS)
predict(<specproc_rsimpls>)
Predictions of a Robust PLS Model
pls_rsimpls
Robust PLS Regression in tidymodels (parsnip Engine)
rpcr()
Robust Principal Component Regression (RPCR)
predict(<specproc_rpcr>)
Predictions of a Robust PCR Model
robust_rmsecv()
Robust Cross-Validation of a Robust Calibration Model
lts_fit()
Robust Linear Regression in tidymodels (LTS parsnip Engine)
select_wavelengths()
Wavelength Selection for PLS Regression
plot_wavelength_selection()
Plot of a Wavelength Selection

robust classification

Classification that resists outlying observations of the training data: robust SIMCA for whole spectra, and robust linear and quadratic discriminant analysis for a few variables (line intensities, robust principal component scores).

rsimca()
Robust SIMCA Classification (RSIMCA)
predict(<specproc_rsimca>)
Predictions of a Robust SIMCA Model
plot_coomans()
Coomans Plot of a Robust SIMCA Model
simca() update(<simca>)
SIMCA Classification Model (parsnip)
simca_gamma() simca_squared()
Tuning Parameters of the SIMCA Model
robust_da()
Robust Linear and Quadratic Discriminant Analysis
predict(<specproc_robust_da>)
Predictions of a Robust Discriminant Analysis

figures of merit

Net analyte signal of a multivariate calibration model, with its sensitivity, selectivity and limits of detection and quantification.

nas()
Net Analyte Signal and Figures of Merit
predict(<specproc_nas>)
Net Analyte Signal of New Samples

calibration transfer

Functions used to to transfer a calibration model developed on one instrument to another instrument.

pds()
Piecewise Direct Standardization
glsw()
Generalized Least Squares Weighting

Recipe steps (tidymodels)

Steps for the recipes package, so that preprocessing and orthogonalization are estimated on the training data of each resample and can be tuned within a tidymodels workflow.

preprocessing

step_baseline()
Baseline Correction Recipe Step
step_savgol()
Savitzky-Golay Recipe Step
step_gap_derivative()
Gap-Segment Derivative Recipe Step
step_bin_spectra()
Binning Recipe Step
step_wavelet()
Wavelet Features Recipe Step
step_snv()
Standard Normal Variate Recipe Step
step_spectral_norm()
Spectral Normalization Recipe Step
step_msc()
Multiplicative Scatter Correction Recipe Step
step_emsc()
Extended Multiplicative Signal Correction Recipe Step
step_pareto_scale()
Pareto Scaling Recipe Step
step_poisson_scale()
Poisson Scaling Recipe Step

LIBS lines and shots

step_line_intensities()
Emission Line Intensities Recipe Step
step_line_ratio()
Internal Standard Normalization Recipe Step
step_reject_shots()
Shot Rejection Recipe Step

robust transformation, PCA and PLS

step_robust_bcyj()
Robust Box-Cox and Yeo-Johnson Transformation Recipe Step
step_robpca()
Robust PCA (ROBPCA) Recipe Step
step_rospca()
Robust Sparse PCA (ROSPCA) Recipe Step
step_macropca()
MacroPCA Recipe Step
step_cellpca()
cellPCA Recipe Step
step_rsimpls()
Robust PLS (RSIMPLS) Recipe Step

orthogonalization

step_epo()
External Parameter Orthogonalization Recipe Step
step_glsw()
Generalized Least Squares Weighting Recipe Step
step_osc()
Orthogonal Signal Correction Recipe Step
step_direct_orthogonal()
Direct Orthogonalization Recipe Step
step_direct_osc()
Direct Orthogonal Signal Correction Recipe Step
step_projected_osc()
Projected Orthogonal Signal Correction (OPLS Filter) Recipe Step
step_opls()
Orthogonal Projections to Latent Structures (OPLS) Recipe Step
step_o2pls()
O2PLS Filter Recipe Step for One or Several Outcomes
step_y_gradient_glsw()
y-Gradient Generalized Least Squares Weighting Recipe Step

wavelength selection

step_select_wavelengths()
Wavelength Selection Recipe Step

tuning parameters

baseline_lambda()
Baseline Smoothness Parameter
glsw_alpha()
Relative GLSW Weighting Parameter
savgol_derivative()
Derivative Order of a Savitzky-Golay Filter
wavelet_level()
Number of Levels of a Wavelet Decomposition
spectral_norm_method()
Norm of a Spectral Normalization
num_intervals()
Number of Intervals

Line identification

Candidate emission lines from the NIST Atomic Spectra Database, overlaid on spectra, an interactive app to identify lines, and the calibration of the wavelength axis on reference lines.

line_finder()
Interactive Identification of Emission Lines
libs_lines()
Candidate Emission Lines for LIBS Spectra
plot_lines()
Overlay Emission Lines on a Spectrum
wavelength_calibration()
Wavelength Calibration from Reference Lines
apply_calibration()
Apply a Wavelength Calibration
predict(<specproc_wavelength_calibration>)
Correct Wavelengths with a Wavelength Calibration
plot_wavelength_calibration()
Plot a Wavelength Calibration

Plasma diagnostics

Electron density from Stark broadening (with the STARK-B database), excitation temperature from Boltzmann and Saha-Boltzmann plots, and checks of LTE, self-absorption and detector saturation.

nist_lines()
Atomic Line Data from the NIST Atomic Spectra Database
nist_ionization_energy()
Ionization Energies from the NIST Atomic Spectra Database
nist_levels() partition_function()
Energy Levels and Partition Functions from the NIST Atomic Spectra Database
starkb_lines()
Stark Broadening Parameters from the STARK-B Database
read_starkb()
Read Saved STARK-B Data
stark_table()
Build a Table of Stark Broadening Parameters
stark_width()
Stark Width of a Line at Given Plasma Conditions
electron_density()
Electron Density from Stark Broadening
boltzmann()
Plasma Temperature from a Boltzmann Plot
saha_boltzmann()
Plasma Temperature from a Saha-Boltzmann Plot
plot_boltzmann()
Draw a Boltzmann or Saha-Boltzmann Plot
mcwhirter_criterion()
McWhirter Criterion for Local Thermodynamic Equilibrium
self_absorption()
Self-Absorption Coefficient from Line Widths
correct_self_absorption()
Self-Absorption Correction with an Internal Reference Line
saturation_summary()
Detect Saturated Channels in Spectra

Line intensities and quantification

Intensities of emission lines, univariate calibration curves with limits of detection, and calibration-free composition (CF-LIBS).

line_intensities()
Intensities of Emission Lines
calibration_curve()
Univariate Calibration Curve
predict(<specproc_calibration>)
Predict from a Calibration Curve
plot_calibration()
Plot a Calibration Curve
cf_libs()
Calibration-Free LIBS Quantification

Peak fitting

Functions used to characterize spectral lines. The choice of the fitting function depends on the specific broadening mechanisms and physical conditions of the emitting environment.

peak_fit()
Peak Fitting
multipeak_fit()
Multiple Peaks Fitting
voigt_fwhm()
Full Width at Half Maximum of a Voigt Profile

Data visualization

Functions that help assess data visually.

plot_fit()
Plotting of Fitted Spectral Line
plot_spectra()
Plotting of Spectra
plot_embedding()
Plot a Two-Dimensional Embedding
plot_loadings()
Loadings of a PCA as Spectra
loading_peaks()
Peaks of the Loadings of a PCA
hotelling_t2()
Hotelling's T-squared Statistic of Samples in an Embedding
q_residuals()
Hotelling's T-squared and Q Residuals of a PCA Model
dmodx()
Distance to the Model (DModX) of a PCA Model
plot_influence()
Influence Plot of a PCA Model
contributions()
Q and T-squared Contributions of a PCA Model
plot_contributions()
Plot Q and T-squared Contributions
plot_outliers()
Univariate Representation of Multivariate Outliers
adjusted_boxplot()
Adjusted Boxplot
generalized_boxplot()
Generalized Boxplot

Smoothing and derivatives

Functions used to increase the signal-to-noise ratio, or to compute derivatives of the spectra.

savitzky_golay()
Savitzky-Golay Smoothing and Derivatives
gap_derivative()
Gap-Segment Derivatives
bin_spectra()
Binning of Adjacent Channels
wavelet_features()
Wavelet Coefficients of Spectra
average()
Fast Average for Large Spectral Dataset
reject_shots()
Rejection of Outlying Laser Shots
plot_shots()
Plots of the Laser Shots and of their Rejection

Baseline correction

Functions used to fit and remove the background emission.

baseline_als()
Asymmetric Least Squares
baseline_lsp()
Least-Squares Polynomial
baseline_arpls()
Asymmetrically Reweighted Penalized Least Squares

Normalization

samples normalization

Functions used to adjust the systematic differences among samples.

msc()
Multiplicative Signal Correction
emsc()
Extended Multiplicative Signal Correction
predict(<specproc_emsc>)
Apply EMSC to New Spectra
normalize()
Spectra Normalization

data scaling

Functions used to adjust each variable/feature by a scaling factor computed based on the dispersion of the variable.

snv()
Standard Normal Variate
pareto_scale()
Pareto Scaling
minmax()
Min-Max Normalization
center()
Data Centering
poisson_scale()
Poisson Scaling

data transformation

Function used to transform variable(s) toward central normality.

robust_bcyj()
Robust Box-Cox and Yeo-Johnson Transformation

Robust statistical estimators

biweight

Functions that use Tukey’s biweight formalism.

biweight_scale()
Biweight Scale
biweight_location()
Biweight Location
biweight_midvariance()
Biweight Midvariance
biweight_midcovariance()
Biweight Midcovariance
biweight_midcorrelation()
Biweight Midcorrelation

tail weight

Functions used to measure the tail weight of a distribution.

quantile_weight()
Quantile Tail Weight Measure
medcouple_weight()
Medcouple Tail Weight Measure

scale

Function used to compute highly robust estimators for scale (or dispersion).

umad()
Unbiased Median Absolute Deviation
rousseeuw_croux()
Rousseeuw-Croux Scale Estimators

Special functions

Functions used for charcaterizing plasma emission in laser spectroscopy.

tukey_gh()
Tukey g-and-h Parametric Distribution
voigt_profile()
Voigt Function
gaussian_profile()
Gaussian Function
lorentzian_profile()
Lorentzian Function
pseudo_voigt_profile()
Pseudo-Voigt Function

Miscellaneous

correlation()
Correlation Coefficients: Pearson, Spearman, Kendall, Chatterjee, and Biweight Midcorrelation
summary_stats()
Classical or Robust Descriptive Statistics

Data

forageLIBS
LIBS Spectra of Forage Samples
forageShots
LIBS Laser Shots of Forage Samples