You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pystatsmodels
Sorry, slow reply, but I'm not sure what the answer should be.
grangercausalitytests looks at the regression on lagged values only in terms of whether all cross lag coefficients are jointly significant.
It doesn't say anything directly about what the dominant lag would be or how many lags are relevant. So, I'm not sure what minimizing the p-value would imply about the lag structure.
We don't have univariate distributed lag models, or transfer models directly. AFAIK, even in the statespace models there is no out of the box support.
To check the importance of specific lags of x2 on predicting x1, based on what's available:
One possibility is to look just at raw correlation, `ccf` should show a peak at the delay lag. (AFAICS, we don't have a partial ccf as analogue to pacf)
Another is to use VAR for the full two variable system, but only look at the lag coefficients for the relevant cross-effect. The coefficient should be large at the delay lag.
grangercausalitytests implements an OLS regression of one variable on the lags of the own and cross variable similar to a single equation of VAR. This could be used to test other hypothesis about the lag coefficients, e.g. that all coefficients beyond a specific lag are zero, this is just a f_test or a wald_test.
The OLS results also have the tvalues and pvalues for individual coefficients in the full model.
All these provide more directly information about specific lag coefficients, and the impact of different lags on the prediction/fit of the first variable, i.e. they are more indicative of which part or lag contributes to granger causality.