Exploratory Principal Component Analysis

epca is an R package for comprehending any data matrix that contains low-rank and sparse underlying signals of interest. The package currently features two key tools:

Installation

You can install the released version of epca from CRAN with:

install.packages("epca")

or the development version from GitHub with:

# install.packages("devtools")
# devtools::install_github("fchen365/epca")
install.packages("epca", repos = c('https://fchen365.r-universe.dev', 'https://cloud.r-project.org'))

Example

The usage of sca and sma is straightforward. For example, to find k sparse PCs of a data matrix X:

sca(X, k)

Similarly, we can find a rank-k sparse matrix decomposition by

sma(X, k)

For more examples, please see the vignette:

vignette("epca")

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub.

Reference

Chen, F., & Rohe, K. (2023). A New Basis for Sparse Principal Component Analysis. Journal of Computational and Graphical Statistics, 1-14. (DOI)