The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Analytical computation of rolling and expanding Shapley values for time-series data. The 'rollshap' package decomposes the coefficient of determination (R-squared) of a linear regression into nonnegative contributions from each explanatory variable using the Shapley value from cooperative game theory (Shapley, 1953, <doi:10.1515/9781400881970-018>). For each window, the exact Shapley value is computed by fitting all subsets of the explanatory variables and averaging the marginal contribution to R-squared across all orderings, which returns an order-invariant attribution that sums to the full-model R-squared. Use cases include variable importance, factor attribution, and feature selection in time-series regression. The package supports rolling and expanding windows, weights, and handling of missing values via '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.1 |
| Depends: | R (≥ 3.0.2) |
| Imports: | Rcpp, RcppParallel |
| LinkingTo: | Rcpp, RcppArmadillo, RcppParallel, roll (≥ 1.1.7) |
| Suggests: | covr, testthat, zoo, relaimpo, roll |
| Published: | 2026-05-21 |
| DOI: | 10.32614/CRAN.package.rollshap (may not be active yet) |
| Author: | Jason Foster [aut, cre] |
| Maintainer: | Jason Foster <jason.j.foster at gmail.com> |
| BugReports: | https://github.com/jasonjfoster/rollshap/issues |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | https://github.com/jasonjfoster/rollshap |
| NeedsCompilation: | yes |
| SystemRequirements: | GNU make |
| Materials: | README |
| CRAN checks: | rollshap results |
| Reference manual: | rollshap.html , rollshap.pdf |
| Package source: | rollshap_1.0.1.tar.gz |
| Windows binaries: | r-devel: rollshap_1.0.1.zip, r-release: not available, r-oldrel: rollshap_1.0.1.zip |
| macOS binaries: | r-release (arm64): rollshap_1.0.1.tgz, r-oldrel (arm64): rollshap_1.0.1.tgz, r-release (x86_64): not available, r-oldrel (x86_64): not available |
Please use the canonical form https://CRAN.R-project.org/package=rollshap to link to this page.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.