Package: msPCA 0.5.1

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://jeanpauphilet.r-universe.dev', 'https://cloud.r-project.org'))

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.29 score 1 stars 6 scripts 294 downloads 6 exports 2 dependencies

Last updated from:67452dea77. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK141
linux-devel-x86_64OK130
source / vignettesOK189
linux-release-arm64OK108
linux-release-x86_64OK124
macos-release-arm64OK161
macos-release-x86_64OK303
macos-oldrel-arm64OK214
macos-oldrel-x86_64OK305
windows-devel-arm64OK341
windows-devel-x86_64OK153
windows-release-arm64OK361
windows-release-x86_64OK117
windows-oldrel-x86_64OK120
wasm-releaseOK98

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-08-19
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