Unlimited learning, half price | 50% off
Get 50% off unlimited learning

⚠️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 Bookdown tutorial.

What is new

The latest major release (0.8.0) has a lot of new features and small improvements. First of all, the tutorial has been moved from GitBook to Bookdown as there were many issues with the first. The tutorial was rewritten completely and now almost comprehensive (some of chapters are still missing though). It is available via Github Pages. A list of other changes is available here

How to install

The package 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 (with 2-3 weeks delay after GitHub release as more thorought testing is needed). 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.8.2.tar.gz and it is located in a current working directory, just run the following:

install.packages('mdatools_0.8.2.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('svkucheryavski/mdatools')

Copy Link

Version

Install

install.packages('mdatools')

Monthly Downloads

852

Version

0.8.2

License

MIT + file LICENSE

Last Published

January 30th, 2017

Functions in mdatools (0.8.2)

as.matrix.regcoeffs

as.matrix method for regression coefficients class
as.matrix.regres

as.matrix method for regression results
as.matrix.plsres

as.matrix method for PLS results
as.matrix.classres

as.matrix method for classification results
as.matrix.ldecomp

as.matrix method for ldecomp object
crossval.str

String with description of cross-validation method
bars

Show bars on axes
classify.plsda

PLS-DA classification
as.matrix.plsdares

as.matrix method for PLS-DA results
crossval

Generate sequence of indices for cross-validation
getCalibrationData.simcam

Get calibration data
getCalibrationData

Calibration data
getClassificationPerformance

Calculation of classification performance parameters
getMainTitle

Get main title
getCalibrationData.pca

Get calibration data
getSelectedComponents.classres

Get selected components
getRegcoeffs.pls

Regression coefficients for PLS model'
getRegcoeffs

Get regression coefficients
erfinv

Inverse error function
errorbars

Show error bars on a plot
ipls

Variable selection with interval PLS
ldecomp.getDistances

Residuals distances for linear decomposition
getSelectivityRatio.pls

Selectivity ratio for PLS model
getVIPScores.pls

VIP scores for PLS model
mda.cbind

A wrapper for cbind() method with proper set of attributes
ldecomp

Linear decomposition of data
imshow

show image data as an image
getVIPScores

VIP scores
mda.setattr

Set data attributes
mda.setimbg

Remove background pixels from image data
getSelectedComponents

Get selected components
getSelectivityRatio

Selectivity ratio
mda.getattr

Get data attributes
mda.subset

A wrapper for subset() method with proper set of attributed
mda.data2im

Convert data matrix to an image
mda.show

Wrapper for show() method
mda.getexclind

Get indices of excluded rows or columns
mda.im2data

Convert image to data matrix
mda.df2mat

Convert data frame to a matrix
mda.inclcols

Include/unhide the excluded columns
mdaplot.getColors

Color values for plot elements
mdaplot

Plotting function for a single set of objects
ipls.backward

Runs the backward iPLS algorithm
mdaplot.areColors

Check color values
ipls.forward

Runs the forward iPLS algorithm
mda.t

A wrapper for t() method with proper set of attributes
mdaplot.showGrid

Plot grid
pca.mvreplace

Replace missing values in data
pca.nipals

NIPALS based PCA algorithm
mdaplot.showLabels

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

Exclude/hide columns in a dataset
mda.exclrows

Exclude/hide rows in a dataset
mda.inclrows

include/unhide the excluded rows
mdaplot.formatValues

Format vector with numeric values
mdaplot.getAxesLim

Calculate axes limits
mda.rbind

A wrapper for rbind() method with proper set of attributes
plot.regres

plot method for regression results
plot.pcares

Plot method for PCA results object
plot.pca

Model overview plot for PCA
plot.simca

Model overview plot for SIMCA
ldecomp.getResLimits

Statistical limits for Q and T2 residuals
ldecomp.getVariances

Explained variance for linear decomposition
mdaplot.showRegressionLine

Regression line for data points
people

People data
mdaplotg

Plotting function for several sets of objects
pinv

Pseudo-inverse matrix
plot.simcamres

Model overview plot for SIMCAM results
plot.simcam

Model overview plot for SIMCAM
plotCooman.simcamres

Cooman's plot for SIMCAM results
plotResiduals.ldecomp

Residuals plot for linear decomposition
plotCorr

Correlation plot
plotResiduals.pca

Residuals plot for PCA
plotSelection.ipls

iPLS performance plot
plotSelection

Selected intervals plot
plotVariance.ldecomp

Explained variance plot for linear decomposition
plotVariance

Variance plot
plotXVariance.pls

Explained X variance plot for PLS
plotXVariance.plsres

Explained X variance plot for PLS results
plotYResiduals.regres

Residuals plot for regression results
mdaplot.showColorbar

Plot colorbar
mdaplot.plotAxes

Create axes plane
plotYVariance

Y variance plot
pca.run

Runs one of the selected PCA methods
plot.ipls

Overview plot for iPLS results
pca.svd

Singular Values Decomposition based PCA algorithm
plot.classres

Plot function for classification results
plot.plsres

Overview plot for PLS results
plot.plsdares

Overview plot for PLS-DA results
plotModellingPower

Modelling power plot
plotModelDistance.simcam

Modelling distance plot for SIMCAM model
plotCumVariance

Variance plot
plotCorr.randtest

Correlation plot for randomization test results
plotPredictions.classres

Prediction plot for classification results
plotPredictions

Predictions plot
plotSelectivityRatio

Selectivity ratio plot
plotSelectivityRatio.pls

Selectivity ratio plot for PLS model
plotXCumVariance

X cumulative variance plot
plotSensitivity

Sensitivity plot
plotSpecificity.classmodel

Specificity plot for classification model
plotXCumVariance.pls

Cumulative explained X variance plot for PLS
plotXVariance

X variance plot
plotXScores.plsres

X scores plot for PLS results
plotYResiduals

Y residuals plot
pls.simpls

SIMPLS algorithm
plotYResiduals.pls

Y residuals plot for PLS
plsda.cal

Calibrate PLS-DA model
predict.pls

PLS predictions
predict.pca

PCA predictions
print.plsda

Print method for PLS-DA model object
print.plsdares

Print method for PLS-DA results object
pls

Partial Least Squares regression
pls.run

Runs selected PLS algorithm
predict.plsda

PLS-DA predictions
predict.simca

SIMCA predictions
print.classres

Print information about classification result object
print.randtest

Print method for randtest object
print.plsres

print method for PLS results object
print.ipls

Print method for iPLS
regres.slope

Slope
regres.rmse

RMSE
print.simcamres

Print method for SIMCAM results object
print.simcares

Print method for SIMCA results object
regres

Regression results
regres.r2

Determination coefficient
simdata

Spectral data of polyaromatic hydrocarbons mixing
summary.ipls

Summary for iPLS results
summary.classres

Summary statistics about classification result object
summary.simcares

Summary method for SIMCA results object
summary.simcamres

Summary method for SIMCAM results object
summary.ldecomp

Summary statistics for linear decomposition
simcam.getPerformanceStatistics

Performance statistics for SIMCAM model
simcam

SIMCA multiclass classification
summary.simca

Summary method for SIMCA model object
summary.simcam

Summary method for SIMCAM model object
pca.crossval

Cross-validation of a PCA model
pca

Principal Component Analysis
plotBiplot

Biplot
pcares

Results of PCA decomposition
pellets

Image data
plotBiplot.pca

PCA biplot
plotDiscriminationPower

Discrimination power plot
plotDiscriminationPower.simcam

Discrimination power plot for SIMCAM model
plotHist

Statistic histogram
plotCooman

Cooman's plot
plotCooman.simcam

Cooman's plot for SIMCAM model
plotMisclassified.classmodel

Misclassified ratio plot for classification model
plotPerformance.classmodel

Performance plot for classification model
plotMisclassified.classres

Misclassified ratio plot for classification results
plotRegcoeffs

Regression coefficients plot
plotPredictions.regres

Predictions plot for regression results
plotPerformance.classres

Performance plot for classification results
plotRMSE.regres

RMSE plot for regression results
plotScores

Scores plot
plotVariance.pca

Explained variance plot for PCA
plotVIPScores

VIP scores plot
plotVariance.pls

Variance plot for PLS
plotXScores

X scores plot
plotVIPScores.pls

VIP scores plot for PLS model
plsres

PLS results
plsdares

PLS-DA results
plotXScores.pls

X scores plot for PLS
regcoeffs

Regression coefficients
regres.bias

Prediction bias
plotHist.randtest

Histogram plot for randomization test results
plotResiduals.simcam

Residuals plot for SIMCAM model
plotModellingPower.simcam

Modelling power plot for SIMCAM model
plotModellingPower.simca

Modelling power plot for SIMCA model
plotRMSE

RMSE plot
plotResiduals.simcamres

Residuals plot for SIMCAM results
plotRMSE.pls

RMSE plot for PLS
plotXLoadings

X loadings plot
plotXCumVariance.plsres

Explained cumulative X variance plot for PLS results
showPredictions

Predictions
simca.classify

SIMCA classification
summary.plsdares

Summary method for PLS-DA results object
summary.plsres

summary method for PLS results object
plotLoadings.pca

Loadings plot for PCA
plotLoadings

Loadings plot
plotRegcoeffs.pls

Regression coefficient plot for PLS
plotPredictions.classmodel

Predictions plot for classification model
plotPerformance

Classification performance plot
plotResiduals

Residuals plot
plotScores.ldecomp

Scores plot for linear decomposition
plotScores.pca

Scores plot for PCA
plotSensitivity.classmodel

Sensitivity plot for classification model
plotXYScores

XY scores plot
plotSensitivity.classres

Sensitivity plot for classification results
plotXResiduals.plsres

X residuals plot for PLS results
plotXResiduals.pls

X residuals plot for PLS
plotYCumVariance.plsres

Explained cumulative Y variance plot for PLS results
plotYCumVariance.pls

Cumulative explained Y variance plot for PLS
plotXYScores.pls

XY scores plot for PLS
plsda.crossval

Cross-validation of a PLS-DA model
plsda

Partial Least Squares Discriminant Analysis
predict.simcam

SIMCA multiple classes predictions
print.ldecomp

Print method for linear decomposition
prep.autoscale

Autoscale values
selectCompNum.pls

Select optimal number of components for PLS model
regcoeffs.getStat

Confidence intervals and p-values for regression coeffificents
print.pca

Print method for PCA model object
randtest

Randomization test for PLS regression
simcamres

Results of SIMCA multiclass classification
showPredictions.classres

Show predicted class values
simcares

Results of SIMCA one-class classification @description simcares is used to store results for SIMCA one-class classification.
summary.pcares

Summary method for PCA results object
summary.pca

Summary method for PCA model object
plotYVariance.pls

Explained Y variance plot for PLS
plotYVariance.plsres

Explained Y variance plot for PLS results
pls.cal

PLS model calibration
prep.norm

Normalization
prep.msc

Multiplicative Scatter Correction transformation
pls.calculateSelectivityRatio

Selectivity ratio calculation
prep.savgol

Savytzky-Golay filter
prep.snv

Standard Normal Variate transformation
print.regcoeffs

print method for regression coefficients class
print.regres

print method for regression results object
summary.randtest

Summary method for randtest object
simca.crossval

Cross-validation of a SIMCA model
simca

SIMCA one-class classification
mdaplot.showLegend

Plot legend
summary.regres

summary method for regression results object
mdatools

Package for Multivariate Data Analysis (Chemometrics)
mdaplot.showLines

Plot lines
plot.plsda

Model overview plot for PLS-DA
pca.cal

PCA model calibration
plot.pls

Model overview plot for PLS
plot.regcoeffs

Regression coefficients plot
plot.randtest

Plot for randomization test results
plotMisclassified

Misclassification ratio plot
plotCumVariance.pca

Cumulative explained variance plot for PCA
plotCumVariance.ldecomp

Cumulative explained variance plot for linear decomposition
plotModelDistance

Model distance plot
plotPredictions.pls

Predictions plot for PLS
plotPredictions.plsres

Predictions plot for PLS results
plotSpecificity.classres

Specificity plot for classification results
plotRMSE.ipls

RMSE development plot
plotResiduals.simcares

Residuals plot for SIMCA results
plotXLoadings.pls

X loadings plot for PLS
plotSpecificity

Specificity plot
plotXResiduals

X residuals plot
plotXYLoadings.pls

XY loadings plot for PLS
plotXYLoadings

X loadings plot
plotXYScores.plsres

XY scores plot for PLS results
plotYCumVariance

Y cumulative variance plot
pls.calculateVIPScores

VIP scores calculation for PLS model
print.simca

Print method for SIMCA model object
pls.crossval

Cross-validation of a PLS model
print.pls

Print method for PLS model object
print.pcares

Print method for PCA results object
selectCompNum.pca

Select optimal number of components for PCA model
selectCompNum

Select optimal number of components for a model
print.simcam

Print method for SIMCAM model object
summary.pls

Summary method for PLS model object
summary.plsda

Summary method for PLS-DA model object
classres

Results of classification