Granger Causality Testing for Time Series
Overview
Performs Granger causality tests on pairs of time series to determine causal relationships. Uses Vector Autoregressive (VAR) models to test whether one time series helps predict another beyond what the series' own past values provide. Returns structured results including p-values, test statistics, and causality conclusions for both directions.
Initial CRAN release.
Features
granger_causality_test()- Main function for performing Granger causality tests- Supports both vector input and tidyverse-style data frame input
- Configurable lag order and significance level
- Returns structured S3 object with p-values, test statistics, and conclusions
- Tidyverse integration
- Pipe-compatible (
%>%and|>) - Non-standard evaluation for column selection
tidy()method for broom-compatible tibble outputglance()method for model-level summary- S3 methods
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
print.granger_result()for clean console outputsummary.granger_result()for detailed results- Example data
example_causalitydataset with known causal relationship for testing and demonstration
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 12 (2 internal)includes a package overview page
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 75%
- Documented parameters
- 100%
- Return-value docs
- 75%
- Help pages citing references
- 8%
Downloads
Repository
Stars over time
Forks 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/nkorf/grangersearch on 2026-10-21.
The R CMD check workflow runs on Linux
Dependencies
Code & Tests
Datasets
People & History
- RR 4.6.0 released · 2026-04-24
- 0.1.0Latest2026-01-12 · current release
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-01-12
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 3.1 KB / 1 file
- Download size
- 65 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("grangersearch")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-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.