Type: Package Package: rollshap Title: Rolling Shapley Values Version: 1.0.2 Authors@R: person("Jason", "Foster", , "jason.j.foster@gmail.com", role = c("aut", "cre")) Description: 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, ). 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 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'. License: GPL (>= 2) URL: https://github.com/jasonjfoster/rollshap BugReports: https://github.com/jasonjfoster/rollshap/issues Depends: R (>= 3.5.0) Imports: Rcpp, RcppParallel Suggests: covr, relaimpo, roll, testthat, zoo LinkingTo: Rcpp, RcppArmadillo, RcppParallel, roll (>= 1.1.7) Config/roxygen2/old_usage: TRUE Config/roxygen2/version: 8.0.0 Encoding: UTF-8 SystemRequirements: GNU make Config/pak/sysreqs: make Repository: https://jasonjfoster.r-universe.dev Date/Publication: 2026-07-05 16:57:11 UTC RemoteUrl: https://github.com/jasonjfoster/rollshap RemoteRef: HEAD RemoteSha: a9a0eccad6dadaa3e6ea333a13cb989aee43f248 NeedsCompilation: yes Packaged: 2026-07-05 17:07:48 UTC; root Author: Jason Foster [aut, cre] Maintainer: Jason Foster