granger_test: Compute a Granger Causality test

Description Usage Arguments Value Author(s)

Description

Given an x (predictor) and y (response) variable, determine if x causes way at the given lag. Uses the F test statistic to compare/evaluate. The Null Hypothesis (H0) is that Time series x does not Granger-cause time series y, and the Alternative Hypothesis (HA): Time series x Granger-causes time series y

Usage

1
granger_test(x, y, alpha, max_lag = 1)

Arguments

x

Predictor variable (can be a vector)

y

Response variable (can be a vector)

alpha

the significance level

max_lag

the maximum number of lags to be considered

Value

A data frame that reports the F statistic, the critical value, and if F > c_v. (if F > c_v we reject the null hypothesis that x does not Granger Cause y)

Author(s)

John Zobitz zobitz@augsburg.edu, based on code from Chandler Lutz, UCR 2009 (https://www.mathworks.com/matlabcentral/fileexchange/25467-granger-causality-test).


jmzobitz/FLUXNETGranger documentation built on Dec. 21, 2021, 1:13 a.m.