## What mdatools can do?

The package includes classes and functions for analysis, preprocessing and plotting data and results. So far the following methods for analysis are implemented:

- Principal Component Analysis (PCA)
- Soft Independent Modelling of Class Analogy (SIMCA), including data driven approach (DD-SIMCA)
- Partial Least Squares regression (PLS) with calculation of VIP scores and Selectivity ratio
- Partial Least Squares Discriminant Analysis (PLS-DA)
- Randomization test for PLS regression models
- Interval PLS for variable selection
- Multivariate curve resolution using the purity approach
- Multivariate curve resolution using the constrained alternating least squares

Preprocessing methods include:

- Mean centering, standardization and autoscaling
- Savitzky-Golay filter for smoothing and derivatives
- Standard Normal Variate for removing scatter and global intensity effect from spectral data
- Mutliplicative Scatter Correction for the same issue
- Normalization of spectra to unit area, unit length, unit sum, unit area under given range.
- Baseline correction with asymmetric least squares
- Kubelka-Munk transformation
- Element wise transformations (
`log`

,`sqrt`

, power, etc.)

Besides that, some extensions for the basic R plotting functionality have been also implemented and allow to do the following:

- Color grouping of objects with automatic color legend bar.
- Plot for several groups of objects with automatically calculated axes limits and plot legend.
- Three built-in color schemes — one is based on Colorbrewer and the other two are jet and grayscale.
- Very easy-to-use possibility to apply any user defined color scheme.
- Possibility to show horizontal and vertical lines on the plot with automatically adjusted axes limits.
- Possibility to extend plotting functionality by using some attributes for datasets.

See `?mdatools`

and next chapters for more details.