Learn R Programming

rrcov: Scalable Robust Estimators with High Breakdown Point

The package rrcov provides scalable robust estimators with high breakdown point and covers a large number of robustified multivariate analysis methods, starting with robust estimators for the multivariate location and covariance matrix (MCD, MVE, S, MM, SD), the deterministic versions of MCD, S and MM estimates and regularized versions (MRCD) for high dimensions. These estimators are used to conduct robust principal components analysis (PcaCov()), linear and quadratic discriminant analysis (Linda(), Qda()), MANOVA. Projection pursuit algorithms for PCA to be applied in high dimensions are also available (PcaHubert(), PcaGrid() and PcaProj()).

Installation

The rrcov package is on CRAN (The Comprehensive R Archive Network) and the latest release can be easily installed using the command

install.packages("rrcov")
library(rrcov)

Building from source

To install the latest stable development version from GitHub, you can pull this repository and install it using

## install.packages("remotes")
remotes::install_github("valentint/rrcov", build_opts = c("--no-build-vignettes"))

Of course, if you have already installed remotes, you can skip the first line (I have commented it out).

Example

This is a basic example which shows you if the package is properly installed:


library(rrcov)
#> Loading required package: robustbase
#> Scalable Robust Estimators with High Breakdown Point (version 1.7-3)
data(hbk)
(out <- CovMcd(hbk))
#> 
#> Call:
#> CovMcd(x = hbk)
#> -> Method:  Fast MCD(alpha=0.5 ==> h=40); nsamp = 500; (n,k)mini = (300,5) 
#> 
#> Robust Estimate of Location: 
#>       X1        X2        X3         Y  
#>  1.55833   1.80333   1.66000  -0.08667  
#> 
#> Robust Estimate of Covariance: 
#>     X1        X2        X3        Y       
#> X1   1.58739   0.03129   0.21694   0.10748
#> X2   0.03129   1.60733   0.25612   0.02864
#> X3   0.21694   0.25612   1.47254  -0.18174
#> Y    0.10748   0.02864  -0.18174   0.44081

Community guidelines

Report issues and request features

If you experience any bugs or issues or if you have any suggestions for additional features, please submit an issue via the Issues tab of this repository. Please have a look at existing issues first to see if your problem or feature request has already been discussed.

Contribute to the package

If you want to contribute to the package, you can fork this repository and create a pull request after implementing the desired functionality.

Ask for help

If you need help using the package, or if you are interested in collaborations related to this project, please get in touch with the package maintainer.

Copy Link

Version

Install

install.packages('rrcov')

Monthly Downloads

14,701

Version

1.7-6

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Last Published

August 19th, 2024

Functions in rrcov (1.7-6)

CovMcd-class

MCD Estimates of Multivariate Location and Scatter
Appalachia

Annual maximum streamflow in central Appalachia
CovMMest

MM Estimates of Multivariate Location and Scatter
Cars

Consumer reports car data: dimensions
PcaProj

Robust Principal Components based on Projection Pursuit (PP): Croux and Ruiz-Gazen (2005) algorithm
PcaGrid

Robust Principal Components based on Projection Pursuit (PP): GRID search Algorithm
CovControlMest

Constructor function for objects of class "CovControlMest"
CovMve

Robust Location and Scatter Estimation via MVE
CovControlMrcd

Constructor function for objects of class "CovControlMrcd"
CovControlSest-class

Class 'CovControlSest' - contains control parameters for "CovSest"
CovControl-class

Class "CovControl" is a VIRTUAL base control class
CovControlMMest-class

Class 'CovControlMMest' - contains control parameters for "CovMMest"
covMest

Constrained M-Estimates of Location and Scatter
CovControlOgk

Constructor function for objects of class "CovControlOgk"
CovControlSest

Constructor function for objects of class "CovControlSest"
getLoadings-methods

Accessor methods to the essential slots of Pca and its subclasses
CovControlSde-class

Class 'CovControlSde' - contains control parameters for "CovSde"
QdaCov-class

Class "QdaCov" - Robust methods for Quadratic Discriminant Analysis
PcaHubert-class

Class "PcaHubert" - ROBust method for Principal Components Analysis
PcaHubert

ROBPCA - ROBust method for Principal Components Analysis
pca.distances

Compute score and orthogonal distances for Principal Components (objects of class 'Pca')
PcaClassic

Principal Components Analysis
Wilks.test

Classical and Robust One-way MANOVA: Wilks Lambda
CovMMest-class

MM Estimates of Multivariate Location and Scatter
CovClassic-class

Class "CovClassic" - classical estimates of multivariate location and scatter
PcaRobust-class

Class "PcaRobust" is a virtual base class for all robust PCA classes
getEllipse

Calculates the points for drawing a confidence ellipsoid
olitos

Olive Oil Data
soil

Exchangable cations in forest soil data set
biplot-methods

Biplot for Principal Components (objects of class 'Pca')
scorePlot-methods

Score plot for Principal Components (objects of class 'Pca')
rrcov-utils

Different utility functions to be used in rrcov and packages depending on rrcov
PcaGrid-class

Class "PcaGrid" - Robust PCA using PP - GRID search Algorithm
CovSde

Stahel-Donoho Estimates of Multivariate Location and Scatter
CovMest

Constrained M-Estimates of Location and Scatter
CovSest-class

S Estimates of Multivariate Location and Scatter
Linda

Robust Linear Discriminant Analysis
CovControlMcd

Constructor function for objects of class "CovControlMcd"
OsloTransect

Oslo Transect Data
CovControlMrcd-class

Class 'CovControlMrcd' - contains control parameters for CovMrcd()
salmon

Salmon data
CovMrcd

Robust Location and Scatter Estimation via Minimum Regularized Covariance Determonant (MRCD)
wages

Wages and Hours
PcaLocantore-class

Class "PcaLocantore" Spherical Principal Components
Cascades

Annual precipitation totals for the North Cascades region
CovOgk-class

OGK Estimates of Multivariate Location and Scatter
CovClassic

Classical Estimates of Multivariate Location and Scatter
LdaPP-class

Class "LdaPP" - Robust method for Linear Discriminant Analysis by Projection-pursuit
QdaClassic

Quadratic Discriminant Analysis
diabetes

Reaven and Miller diabetes data
PredictQda-class

Class "PredictQda" - prediction of "Qda" objects
CovMrcd-class

MRCD Estimates of Multivariate Location and Scatter
SummaryCovRobust-class

Class "SummaryCovRobust" - summary of "CovRobust" objects
CovControlMest-class

Class 'CovControlMest' - contains control parameters for "CovMest"
machines

Computer Hardware
CovControlSde

Constructor function for objects of class "CovControlSde"
PcaCov

Robust PCA based on a robust covariance matrix
CovControlMve

Constructor function for objects of class "CovControlMve"
LdaPP

Robust Linear Discriminant Analysis by Projection Pursuit
SummaryCov-class

Class "SummaryCov" - summary of "Cov" objects
bus

Automatic vehicle recognition data
bushmiss

Campbell Bushfire Data with added missing data items
lmom33

Hosking and Wallis Data Set, Table 3.3
un86

United Nations Data - 1986
maryo

Marona and Yohai Artificial Data
QdaCov

Robust Quadratic Discriminant Analysis
PredictLda-class

Class "PredictLda" - prediction of "Lda" objects
LdaClassic-class

Class "LdaClassic" - Linear Discriminant Analysis
CovMve-class

MVE Estimates of Multivariate Location and Scatter
isSingular-methods

Check if a covariance matrix (object of class 'Cov') is singular
PcaCov-class

Class "PcaCov" - Robust PCA based on a robust covariance matrix
rice

Rice taste data
LdaClassic

Linear Discriminant Analysis
octane

Octane data
CovControlMve-class

Class 'CovControlMve' - contains control parameters for CovMve
restimate-methods

Methods for Function estimate in Package 'rrcov'
SummaryQda-class

Class "SummaryQda" - summary of "Qda" objects
Cov-class

Class "Cov" -- a base class for estimates of multivariate location and scatter
pottery

Archaic Greek Pottery data
wolves

Skull dimensions of the wolf Canis lupus L.
Lda-class

Class "Lda" - virtual base class for all classic and robust LDA classes
CovOgk

Robust Location and Scatter Estimation - Ortogonalized Gnanadesikan-Kettenring (OGK)
CovSest

S Estimates of Multivariate Location and Scatter
fish

Fish Catch Data Set
T2.test

Robust Hotelling T2 test
SummaryLda-class

Class "SummaryLda" - summary of "Lda" objects
CovControlMMest

Constructor function for objects of class "CovControlMMest"
PcaLocantore

Spherical Principal Components
CovMcd

Robust Location and Scatter Estimation via MCD
fruit

Fruit data set
CovRobust-class

Class "CovRobust" - virtual base class for robust estimates of multivariate location and scatter
PcaProj-class

Class "PcaProj" - Robust PCA using PP - Croux and Ruiz-Gazen (2005) algorithm
CovControlMcd-class

Class 'CovControlMcd' - contains control parameters for CovMcd
QdaRobust-class

Class "QdaRobust" is a virtual base class for all robust QDA classes
lmom32

Hosking and Wallis Data Set, Table 3.2
CovSde-class

Stahel-Donoho Estimates of Multivariate Location and Scatter
PcaClassic-class

Class "PcaClassic" - Principal Components Analysis
CovRobust

Robust Location and Scatter Estimation
CovControlOgk-class

Class 'CovControlOgk' - contains control parameters for CovOgk
Pca-class

Class "Pca" - virtual base class for all classic and robust PCA classes
Qda-class

Class "Qda" - virtual base class for all classic and robust QDA classes
CovMest-class

Constrained M-estimates of Multivariate Location and Scatter
ionosphere

Johns Hopkins University Ionosphere database.
LdaRobust-class

Class "LdaRobust" is a virtual base class for all robust LDA classes
Linda-class

Class "Linda" - Robust method for LINear Discriminant Analysis
QdaClassic-class

Class "QdaClassic" - Quadratic Discriminant Analysis
SummaryPca-class

Class "SummaryPca" - summary of "Pca" objects
pca.scoreplot

Score plot for Principal Components (objects of class 'Pca')
getCenter-methods

Accessor methods to the essential slots of Cov and its subclasses
hemophilia

Hemophilia Data
plot-methods

Methods for Function 'plot' in Package 'rrcov'