dirconn.analytic_gc_test#

dirconn.analytic_gc_test(estimator: GC, data: TimeSeries, *, alpha: float = 0.05) → AnalyticTestResult#

Test Granger causality with the F distribution of nested least-squares models.

Parameters:
  • estimator (GC) – Must have ridge=0 and method="refit": with a penalty the models are not ordinary least squares, and the reduced models of method="state_space" are not least-squares fits, so the F distribution does not apply.

  • data (TimeSeries) – Input data.

  • alpha (float) – Default level for AnalyticTestResult.significant().

Return type:

AnalyticTestResult

Raises:
  • TypeError – If estimator is not a GC.

  • ValueError – With a ridge penalty, method="state_space", or when the data leave no residual degrees of freedom.