Package: msPCA 0.5.1

Jean Pauphilet

msPCA: Sparse Principal Component Analysis with Multiple Principal Components

Implements an algorithm for computing multiple sparse principal components of a dataset. The method is based on Cory-Wright and Pauphilet "Sparse PCA with Multiple Components" (2026) <doi:10.1287/opre.2023.0598>. The algorithm uses an iterative deflation heuristic with a truncated power method applied at each iteration to compute sparse principal components with controlled sparsity.

Authors:Ryan Cory-Wright [aut, cph], Jean Pauphilet [aut, cre, cph]

msPCA_0.5.1.tar.gz
msPCA_0.5.1.zip(r-4.7-x86_64)msPCA_0.5.1.zip(r-4.7-arm64)msPCA_0.5.1.zip(r-4.6-x86_64)msPCA_0.5.1.zip(r-4.6-arm64)msPCA_0.5.1.zip(r-4.5-x86_64)
msPCA_0.5.1.tgz(r-4.6-x86_64)msPCA_0.5.1.tgz(r-4.6-arm64)msPCA_0.5.1.tgz(r-4.5-x86_64)msPCA_0.5.1.tgz(r-4.5-arm64)
msPCA_0.5.1.tar.gz(r-4.7-arm64)msPCA_0.5.1.tar.gz(r-4.7-x86_64)msPCA_0.5.1.tar.gz(r-4.6-arm64)msPCA_0.5.1.tar.gz(r-4.6-x86_64)
msPCA_0.5.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
msPCA/json (API)

# Install 'msPCA' in R:
install.packages('msPCA', repos = c('https://ropensci-staging.r-universe.dev', 'https://cloud.r-project.org'))

Reviews:rOpenSci Software Review #826()

Bug tracker:https://github.com/jeanpauphilet/mspca/issues

Pkgdown/docs site:https://jeanpauphilet.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • snp500 - Market-deflated correlation matrix of S&P 500 daily returns

On CRAN:

Conda:

dimensionality-reductionprincipal-component-analysissparse-pcacpp

5.35 score 1 stars 416 downloads 6 exports 2 dependencies

Last updated from:2e571aeba9. Checks:16 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK109
linux-devel-x86_64OK139
pkgdown docsOK173
source / vignettesOK210
linux-release-arm64OK113
linux-release-x86_64OK142
macos-release-arm64OK136
macos-release-x86_64OK303
macos-oldrel-arm64OK129
macos-oldrel-x86_64OK378
windows-devel-arm64OK247
windows-devel-x86_64OK249
windows-release-arm64OK272
windows-release-x86_64OK207
windows-oldrel-x86_64OK203
wasm-releaseOK116

Exports:feasibility_violation_offfraction_variance_explainedfraction_variance_explained_perPCmspcatpmvariance_explained_perPC

Dependencies:RcppRcppEigen

Algorithm and implementation notes
The problem | Evaluation metrics | Lagrangian alternating maximization | Implementation details | Computational complexity | Guidance on parameter choices | Choosing the sparsity budgets ks | Choosing the constraint type | Iteration and restart budgets | References

Last update: 2026-11-16
Started: 2026-08-12

Case study: sparse factors in S&P 500 returns
The data | Sparse factor extraction | Comparing the two constraint types | Interpreting the sparse components | Under orthogonality constraints | Under zero-correlation constraints | Takeaway | References

Last update: 2026-08-18
Started: 2026-08-12

Worked example: msPCA on mtcars
Overview | Install and load | Fit two sparse PCs | Working from the raw data matrix | Orthogonality versus zero correlation | Diagnostics | Comparison with dense PCA | Where to go next

Last update: 2026-08-18
Started: 2026-06-12