Rolling Eigenanalysis
Overview
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 the largest to smallest eigenvalue 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'.
- Fixed an issue for the
orderargument in theroll_eigenfunction
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK6 OK2026-06-20
Documentation
- Help pages
- 3includes a package overview page
- Examples that run
- 100%2 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 33%
Downloads
Repository
Stars over time
Commits over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/jasonjfoster/rolleigen on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
The repository owner accepts GitHub Sponsors
Dependencies
Installing rolleigen adds 4 packages (4 with compiled code, 3.6 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB, RcppParallel 744 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.1Latest
- 1.0.02026-06-19
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-06-19
- Total releases
- 2 / 1 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 21 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rolleigen")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.