rolleigen: Rolling Eigenanalysis

Fast and efficient computation of rolling and expanding eigenanalysis for time-series data. The 'rolleigen' package decomposes the covariance matrix of the explanatory variables into eigenvalues and eigenvectors to perform principal component analysis (Pearson, 1901, <doi:10.1080/14786440109462720>; Hotelling, 1933, <doi:10.1037/h0071325>) and principal component regression (Massy, 1965, <doi:10.1080/01621459.1965.10480787>) over rolling and expanding windows. For each window, the eigenvalues and eigenvectors are computed from the covariance matrix and, optionally, ordered from largest to smallest to summarize the directions of greatest variation in the data. A subset of leading components is then used to fit a regression that mitigates collinearity in the explanatory variables. Use cases include dimensionality reduction, factor extraction, and regression on collinear explanatory variables. The package supports rolling and expanding windows, weights, and handling of missing values via the min_obs, complete_obs, and na_restore arguments. The implementation uses the online and offline algorithms from the 'roll' package to compute rolling and expanding cross-products efficiently, with parallelism across columns and windows provided by 'RcppParallel'.

Version: 1.0.0
Depends: R (≥ 3.5.0)
Imports: Rcpp, RcppParallel
LinkingTo: Rcpp, RcppArmadillo, RcppParallel, roll (≥ 1.1.7)
Suggests: covr, pls, roll, testthat, zoo
Published: 2026-06-19
DOI: 10.32614/CRAN.package.rolleigen (may not be active yet)
Author: Jason Foster [aut, cre]
Maintainer: Jason Foster <jason.j.foster at gmail.com>
BugReports: https://github.com/jasonjfoster/rolleigen/issues
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
URL: https://github.com/jasonjfoster/rolleigen
NeedsCompilation: yes
SystemRequirements: GNU make
Materials: README, NEWS
CRAN checks: rolleigen results

Documentation:

Reference manual: rolleigen.html , rolleigen.pdf

Downloads:

Package source: rolleigen_1.0.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=rolleigen to link to this page.