Learn R Programming

⚠️There's a newer version (0.14.2) of this package.Take me there.

Multivariate Data Analysis Tools

mdatools is an R package for preprocessing, exploring and analysis of multivariate data. The package provides methods mostly common for Chemometrics. It was created for an introductory PhD course on Chemometrics given at Section of Chemical Engineering, Aalborg University.

The general idea of the package is to collect most widespread chemometric methods and give a similar "user interface" for using them. So if a user knows how to make a model and visualise results for one method, he or she can easily do this for the others.

For more details and examples read a GitBook tutorial.

How to install

The package now is available from CRAN by usual installing procedure. However due to restrictions in CRAN politics regarding number of submissions (one in 3-4 month) only major releases will be published there. To get the latest release plase use GitHub sources. You can download a zip-file with source package and install it using the install.packages command, e.g. if the downloaded file is mdatools_0.7.0.tar.gz and it is located in a current working directory, just run the following:

install.packages('mdatools_0.7.0.tar.gz')

If you have devtools package installed, the following command will install the latest release from the master branch of GitHub repository (do not forget to load the devtools package first):

install_github('mdatools', username = 'svkucheryavski')

Copy Link

Version

Install

install.packages('mdatools')

Monthly Downloads

709

Version

0.7.0

License

GPL-3

Maintainer

Sergey Kucheryavskiy

Last Published

November 30th, 2015

Functions in mdatools (0.7.0)

simdata

Spectral data of polyaromatic hydrocarbons mixing
as.matrix.classres

as.matrix method for classification results
mdaplot.showGrid

Plot grid
people

People data
crossval

Generate sequence of indices for cross-validation
as.matrix.plsdares

as.matrix method for PLS-DA results
pca.nipals

NIPALS based PCA algorithm
plotDiscriminationPower

Discrimination power plot
plotVIPScores.pls

VIP scores plot for PLS model
mdaplot.showLabels

Plot labels Shows labels for data elements (points, bars) on a plot.
plot.plsres

Overview plot for PLS results
plotXCumVariance.plsres

Explained cumulative X variance plot for PLS results
as.matrix.regcoeffs

as.matrix method for regression coefficients class
pcares

Results of PCA decomposition
mdaplot.plotAxes

Create axes plane
plotDiscriminationPower.simcam

Discrimination power plot for SIMCAM model
getSelectedComponents.classres

Get selected components
plotCumVariance.pca

Cumulative explained variance plot for PCA
ldecomp.getResLimits

Statistical limits for Q and T2 residuals
plotScores.ldecomp

Scores plot for linear decomposition
as.matrix.regres

as.matrix method for regression results
errorbars

Show error bars on a plot
plotLoadings.pca

Loadings plot for PCA
pca.mvreplace

Replace missing values in data
ldecomp.getDistances

Residuals distances for linear decomposition
getCalibrationData.pca

Get calibration data
pca.svd

Singular Values Decomposition based PCA algorithm
getMainTitle

Get main title
mdatools

Package for Multivariate Data Analysis (Chemometrics)
plotVariance.ldecomp

Explained variance plot for linear decomposition
plotSelection

Selected intervals plot
plotResiduals.pca

Residuals plot for PCA
mdaplot.formatValues

Format vector with numeric values
plotCorr.randtest

Correlation plot for randomization test results
plotRMSE.regres

RMSE plot for regression results
plotHist.randtest

Histogram plot for randomization test results
getClassificationPerformance

Calculation of classification performance parameters
as.matrix.plsres

as.matrix method for PLS results
ipls.forward

Runs the forward iPLS algorithm
getRegcoeffs

Get regression coefficients
plot.plsda

Model overview plot for PLS-DA
getSelectivityRatio.pls

Selectivity ratio for PLS model
prep.snv

Standard Normal Variate transformation
plot.pca

Model overview plot for PCA
plotResiduals

Residuals plot
plotPerformance.classmodel

Performance plot for classification model
plotResiduals.ldecomp

Residuals plot for linear decomposition
plotPerformance

Classification performance plot
classres

Results of classification
plot.regcoeffs

Regression coefficients plot
plotSelectivityRatio

Selectivity ratio plot
getSelectedComponents

Get selected components
mdaplot.showLines

Plot lines
predict.plsda

PLS-DA predictions
plotRMSE.plsres

RMSE plot for PLS results
ipls

Variable selection with interval PLS
plot.regres

plot method for regression results
ldecomp.getVariances

Explained variance for linear decomposition
plotVariance.pls

Variance plot for PLS
mdaplot.getAxesLim

Calculate axes limits
plotHist

Statistic histogram
getCalibrationData.simcam

Get calibration data
plotPerformance.classres

Performance plot for classification results
predict.pls

PLS predictions
plotXLoadings.pls

X loadings plot for PLS
plotModellingPower

Modelling power plot
plotVariance.pca

Explained variance plot for PCA
plotCooman.simcam

Cooman's plot for SIMCAM model
ipls.backward

Runs the backward iPLS algorithm
as.matrix.ldecomp

as.matrix method for ldecomp object
plot.pls

Model overview plot for PLS
crossval.str

String with description of cross-validation method
mdaplot

Plotting function for a single set of objects
pinv

Pseudo-inverse matrix
classify.plsda

PLS-DA classification
pca.cal

PCA model calibration
plotPredictions

Predictions plot
plot.simcam

Model overview plot for SIMCAM
plotRMSE

RMSE plot
getCalibrationData

Calibration data
plotModellingPower.simcam

Modelling power plot for SIMCAM model
plotCooman

Cooman's plot
getRegcoeffs.pls

Regression coefficients for PLS model'
plot.classres

Plot function for classification results
plotCooman.simcamres

Cooman's plot for SIMCAM results
getSelectivityRatio

Selectivity ratio
plotPredictions.classres

Prediction plot for classification results
plot.ipls

Overview plot for iPLS results
plot.pcares

Plot method for PCA results object
plotScores

Scores plot
plotMisclassified.classres

Misclassified ratio plot for classification results
plot.randtest

Plot for randomization test results
erfinv

Inverse error function
plotXYLoadings.pls

XY loadings plot for PLS
plotMisclassified.classmodel

Misclassified ratio plot for classification model
plotPredictions.classmodel

Predictions plot for classification model
plotModelDistance.simcam

Modelling distance plot for SIMCAM model
plot.plsdares

Overview plot for PLS-DA results
print.regres

print method for regression results object
simcares

Results of SIMCA one-class classification
plotSensitivity.classres

Sensitivity plot for classification results
mdaplotg

Plotting function for several sets of objects
pls.calculateVIPScores

VIP scores calculation for PLS model
pca

Principal Component Analysis
plotSensitivity

Sensitivity plot
pls.simpls

SIMPLS algorithm
mdaplot.areColors

Check color values
plotXResiduals.plsres

X residuals plot for PLS results
predict.simcam

SIMCA multiple classes predictions
plotSpecificity

Specificity plot
plotXResiduals

X residuals plot
plot.simcamres

Model overview plot for SIMCAM results
plotModellingPower.simca

Modelling power plot for SIMCA model
plotVariance

Variance plot
summary.simcares

Summary method for SIMCA results object
plotXYLoadings

X loadings plot
simcam.getPerformanceStatistics

Performance statistics for SIMCAM model
plotXYScores.pls

XY scores plot for PLS
plotRegcoeffs.pls

Regression coefficient plot for PLS
mdaplot.showRegressionLine

Regression line for data points
plotResiduals.simcares

Residuals plot for SIMCA results
plotPredictions.regres

Predictions plot for regression results
plot.simca

Model overview plot for SIMCA
plotYCumVariance.pls

Cumulative explained Y variance plot for PLS
pls.calculateSelectivityRatio

Selectivity ratio calculation
plotPredictions.pls

Predictions plot for PLS
plotYResiduals.pls

Y residuals plot for PLS
plotCorr

Correlation plot
plotYCumVariance

Y cumulative variance plot
plotSpecificity.classmodel

Specificity plot for classification model
getVIPScores.pls

VIP scores for PLS model
plotPredictions.plsres

Predictions plot for PLS results
print.pcares

Print method for PCA results object
plotYCumVariance.plsres

Explained cumulative Y variance plot for PLS results
plotYVariance

Y variance plot
plotXVariance

X variance plot
plotVIPScores

VIP scores plot
pls.cal

PLS model calibration
plotRegcoeffs

Regression coefficients plot
pls

Partial Least Squares regression
prep.msc

Multiplicative Scatter Correction transformation
print.plsres

print method for PLS results object
getVIPScores

VIP scores
plotXResiduals.pls

X residuals plot for PLS
plsda

Partial Least Squares Discriminant Analysis
prep.norm

Normalization
plsres

PLS results
plotXScores.plsres

X scores plot for PLS results
print.plsda

Print method for PLS-DA model object
print.simcamres

Print method for SIMCAM results object
showPredictions

Predictions
plotRMSE.ipls

RMSE development plot
plotResiduals.simcamres

Residuals plot for SIMCAM results
randtest

Randomization test for PLS regression
plotSensitivity.classmodel

Sensitivity plot for classification model
plotXYScores.plsres

XY scores plot for PLS results
print.randtest

Print method for randtest object
regres.bias

Prediction bias
plotCumVariance

Variance plot
mdaplot.getColors

Color values for plot elements
selectCompNum

Select optimal number of components for a model
predict.simca

SIMCA predictions
summary.pca

Summary method for PCA model object
selectCompNum.pca

Select optimal number of components for PCA model
summary.ldecomp

Summary statistics for linear decomposition
plotLoadings

Loadings plot
plotXCumVariance.pls

Cumulative explained X variance plot for PLS
plotYResiduals

Y residuals plot
plotResiduals.simcam

Residuals plot for SIMCAM model
print.classres

Print information about classification result object
print.regcoeffs

print method for regression coefficients class
plotCumVariance.ldecomp

Cumulative explained variance plot for linear decomposition
selectCompNum.pls

Select optimal number of components for PLS model
print.simca

Print method for SIMCA model object
mdaplot.showColorbar

Plot colorbar
simca.crossval

Cross-validation of a SIMCA model
simcamres

Results of SIMCA multiclass classification
regres.rmse

RMSE
plotMisclassified

Misclassification ratio plot
plotScores.pca

Scores plot for PCA
summary.simcamres

Summary method for SIMCAM results object
print.pls

Print method for PLS model object
plotModelDistance

Model distance plot
plotSpecificity.classres

Specificity plot for classification results
print.ipls

Print method for iPLS
print.ldecomp

Print method for linear decomposition
prep.autoscale

Autoscale values
summary.ipls

Summary for iPLS results
plotYVariance.pls

Explained Y variance plot for PLS
simca

SIMCA one-class classification
print.simcares

Print method for SIMCA results object
plotXScores.pls

X scores plot for PLS
predict.pca

PCA predictions
simca.classify

SIMCA classification
plotYVariance.plsres

Explained Y variance plot for PLS results
summary.regres

summary method for regression results object
summary.pcares

Summary method for PCA results object
plotXYScores

XY scores plot
regres.r2

Determination coefficient
bars

Show bars on axes
regcoeffs.getStat

Confidence intervals and p-values for regression coeffificents
summary.simca

Summary method for SIMCA model object
regres

Regression results
showPredictions.classres

Show predicted class values
print.pca

Print method for PCA model object
pca.crossval

Cross-validation of a PCA model
plotXCumVariance

X cumulative variance plot
summary.randtest

Summary method for randtest object
summary.pls

Summary method for PLS model object
mdaplot.showLegend

Plot legend
summary.plsdares

Summary method for PLS-DA results object
ldecomp

Linear decomposition of data
plotXVariance.pls

Explained X variance plot for PLS
pls.crossval

Cross-validation of a PLS model
summary.plsda

Summary method for PLS-DA model object
plsda.crossval

Cross-validation of a PLS-DA model
plotXVariance.plsres

Explained X variance plot for PLS results
summary.classres

Summary statistics about classification result object
simcam

SIMCA multiclass classification
plotRMSE.pls

RMSE plot for PLS
summary.simcam

Summary method for SIMCAM model object
plotSelectivityRatio.pls

Selectivity ratio plot for PLS model
plotSelection.ipls

iPLS performance plot
print.plsdares

Print method for PLS-DA results object
plotXLoadings

X loadings plot
plsdares

PLS-DA results
prep.savgol

Savytzky-Golay filter
plotXScores

X scores plot
plsda.getReferenceValues

Reference values for PLS-DA
plotYResiduals.regres

Residuals plot for regression results
regres.slope

Slope
print.simcam

Print method for SIMCAM model object
regcoeffs

Regression coefficients
summary.plsres

summary method for PLS results object