# pcaMethods v1.64.0

## A collection of PCA methods

Provides Bayesian PCA, Probabilistic PCA, Nipals PCA,
Inverse Non-Linear PCA and the conventional SVD PCA. A cluster
based method for missing value estimation is included for
comparison. BPCA, PPCA and NipalsPCA may be used to perform PCA
on incomplete data as well as for accurate missing value
estimation. A set of methods for printing and plotting the
results is also provided. All PCA methods make use of the same
data structure (pcaRes) to provide a common interface to the
PCA results. Initiated at the Max-Planck Institute for
Molecular Plant Physiology, Golm, Germany.

## Readme

# pcaMethods

R package for performing principal component analysis PCA with applications to missing value imputation. Provides a single interface to performing PCA using

**SVD:**a fast method which is also the standard method in R but which is not applicable for data with missing values.**NIPALS:**an iterative fast method which is applicable also to data with missing values.**PPCA:**Probabilistic PCA which is applicable also on data with missing values. Missing value estimation is typically better than NIPALS but also slower to compute and uses more memory. A port to R of the implementation by Jakob Verbeek.**BPCA:**Bayesian PCA which performs very well in the presence of missing values but is slower than PPCA. A port of the matlab implementation by Shigeyuki Oba.**NLPCA:**Non-linear PCA which can find curves in data and in presence of such can perform accurate missing value estimation. Matlab port of the implementation by Mathias Scholz.

pcaMethods is a Bioconductor package and you can install it by

```
source("https://bioconductor.org/biocLite.R")
biocLite("pcaMethods")
```

## Documentation

```
browseVignettes("pcaMethods")
?<function_name>
```

## Functions in pcaMethods

Name | Description | |

metaboliteDataComplete | A complete metabolite data set from an Arabidopsis coldstress experiment | |

nipalsPca | NIPALS PCA | |

R2cum,pcaRes-method | Cumulative R2 is the total ratio of variance that is being explained by the model | |

helix | A helix structured toy data set | |

loadings,ANY-method | Crude way to unmask the function with the same name from stats | |

Q2 | Cross-validation for PCA | |

deletediagonals | Delete diagonals | |

checkData | Do some basic checks on a given data matrix | |

asExprSet | Convert pcaRes object to an expression set | |

errorHierarchic | Later | |

nVar,pcaRes-method | Get the number of variables used to build the PCA model. | |

center,pcaRes-method | Get the centers of the original variables | |

cvstat,pcaRes-method | Get cross-validation statistics (e.g. $Q^2$). | |

simpleEllipse | Hotelling's T^2 Ellipse | |

pcaNet | Class representation of the NLPCA neural net | |

predict-methods | Predict values from PCA. | |

biplot-methods | Plot a overlaid scores and loadings plot | |

linr | Linear kernel | |

pcaRes | Class for representing a PCA result | |

R2VX,pcaRes-method | R2 goodness of fit | |

derrorHierarchic | Later | |

showNniRes | Print a nniRes model | |

nlpca | Non-linear PCA | |

pca | Perform principal component analysis | |

lineSearch | Line search for conjugate gradient | |

llsImpute | LLSimpute algorithm | |

scl,pcaRes-method | Get the scales (e.g. standard deviations) of the original variables | |

nP,pcaRes-method | Get number of PCs | |

DModX,pcaRes-method | DModX | |

method,pcaRes-method | Get the used PCA method | |

dim.pcaRes | Dimensions of a PCA model | |

fitted-methods | Extract fitted values from PCA. | |

nPcs,pcaRes-method | Get number of PCs. | |

ppca | Probabilistic PCA | |

BPCA_dostep | Do BPCA estimation step | |

plotPcs | Plot many side by side scores XOR loadings plots | |

loadings,pcaRes-method | Get loadings from a pcaRes object | |

summary | Summary of PCA model | |

sDev,pcaRes-method | Get the standard deviations of the scores (indicates their relevance) | |

robustSvd | Alternating L1 Singular Value Decomposition | |

show-methods | Print/Show for pcaRes | |

leverage,pcaRes-method | Extract leverages of a PCA model | |

pcaMethods-deprecated | Deprecated methods for pcaMethods | |

weightsAccount | Create an object that holds the weights for nlpcaNet. Holds and sets weights in using an environment object. | |

scores.pcaRes | Get scores from a pcaRes object | |

vector2matrices,matrix-method | Tranform the vectors of weights to matrix structure | |

metaboliteData | A incomplete metabolite data set from an Arabidopsis coldstress experiment | |

pcaMethods | pcaMethods | |

tempFixNas | Temporary fix for missing values | |

optiAlgCgd | Conjugate gradient optimization | |

plot.pcaRes | Plot diagnostics (screeplot) | |

orth | Calculate an orthonormal basis | |

vector2matrices,nlpcaNet-method | Tranform the vectors of weights to matrix structure | |

svdImpute | SVDimpute algorithm | |

svdPca | Perform principal component analysis using singular value decomposition | |

nni | Nearest neighbour imputation | |

repmat | Replicate and tile an array. | |

scaled,pcaRes-method | Check if scaling was part of the PCA model | |

wasna,pcaRes-method | Get a matrix with indicating the elements that were missing in the input data. Convenient for estimating imputation performance. | |

centered,pcaRes-method | Check centering was part of the model | |

cvseg | Get CV segments | |

robustPca | PCA implementation based on robustSvd | |

nObs,pcaRes-method | Get the number of observations used to build the PCA model. | |

loadings.pcaRes | Get loadings from a pcaRes object | |

bpca | Bayesian PCA missing value estimation | |

BPCA_initmodel | Initialize BPCA model | |

RnipalsPca | NIPALS PCA implemented in R | |

kEstimate | Estimate best number of Components for missing value estimation | |

kEstimateFast | Estimate best number of Components for missing value estimation | |

nmissing,pcaRes-method | Missing values | |

nniRes | Class for representing a nearest neighbour imputation result | |

sortFeatures | Sort the features of NLPCA object | |

prep | Pre-process a matrix for PCA | |

scores,pcaRes-method | Get scores from a pcaRes object | |

getHierarchicIdx | Index in hiearchy | |

forkNlpcaNet | Complete copy of nlpca net object | |

completeObs,nniRes-method | Get the original data with missing values replaced with predicted values. | |

listPcaMethods | List PCA methods | |

slplot,pcaRes-method | Side by side scores and loadings plot | |

rediduals-methods | Residuals values from a PCA model. | |

No Results! |

## Last year downloads

## Details

License | GPL (>= 3) |

LinkingTo | Rcpp |

LazyLoad | Yes |

SystemRequirements | Rcpp |

URL | https://github.com/hredestig/pcamethods |

BugReports | https://github.com/hredestig/pcamethods/issues |

Collate | 'derrorHierarchic.R' 'errorHierarchic.R' 'AllClasses.R' 'AllGenerics.R' 'BPCA_dostep.R' 'BPCA_initmodel.R' 'bpca.R' 'checkData.R' 'forkNlpcaNet.R' 'kEstimate.R' 'kEstimateFast.R' 'lineSearch.R' 'llsImpute.R' 'methods-ExpressionSet.R' 'methods-nniRes.R' 'methods-pcaRes.R' 'nipalsPca.R' 'nlpca.R' 'optiAlgCgd.R' 'orth.R' 'pca.R' 'pcaMethods-package.R' 'ppca.R' 'prep.R' 'repmat.R' 'robustPca.R' 'sortFeatures.R' 'svdImpute.R' 'vector2matrices.R' 'xval.R' |

Packaged | 2013-03-12 21:41:03 UTC; henning |

biocViews | Bayesian |

RoxygenNote | 5.0.1 |

depends | Biobase , methods |

imports | BiocGenerics , MASS , Rcpp (>= 0.11.3) |

suggests | ggplot2 , lattice , matrixStats |

Contributors | Wolfram Stacklies, Kevin Wright, Henning Redestig |

#### Include our badge in your README

```
[![Rdoc](http://www.rdocumentation.org/badges/version/pcaMethods)](http://www.rdocumentation.org/packages/pcaMethods)
```