🤖 AI Summary
This work addresses the lack of efficient and systematic support for exploring Granger causality in multivariate time series within modern data science workflows. We introduce an R package that, for the first time, seamlessly integrates exhaustive Granger causality testing with the tidyverse ecosystem. Built upon the vars package, it automates lag order selection and provides pipe-friendly operations, non-standard evaluation, and broom-compatible tidy() and glance() methods. By unifying causal inference with tidy data principles, the tool substantially simplifies multivariate Granger causality analysis, enhances code readability, and ensures consistency with contemporary analytical pipelines. Through practical examples, we demonstrate its usability and effectiveness in lowering the barrier to entry for applied Granger causality testing.
📝 Abstract
This paper introduces grangersearch, an R package for performing exhaustive Granger causality searches on multiple time series. The package provides: (1) exhaustive pairwise search across multiple variables, (2) automatic lag order optimization with visualization, (3) tidyverse-compatible syntax with pipe operators and non-standard evaluation, and (4) integration with the broom ecosystem through tidy() and glance() methods. The package wraps the vars infrastructure while providing a simple interface for exploratory causal analysis. We describe the statistical methodology, demonstrate the package through worked examples, and discuss practical considerations for applied researchers.