I am encountering a few problems when I tried to run var codes to be followed by a Granger test. I am using Stata 14.
My dataset is a list of 70 countries and 20 quarters (approx 1400 observations). The panel is balanced. I am investigating whether certain variables such as newspaper articles influence the number of ICOs in a given quarter/country. Hence the DV goes from 0 (many zeroes) to 77 with average of 0.68. To establish causality I would like to run a Granger causality test.
I tried running a few models but I always get errors. var (see below) but I get "repeated time values in sample".
Code:
var NumberofICOperquarter LNNumberofnews, lags(1/2)
repeated time values in sample
r(451);
r(451);
Code:
pvar NumberofICOperquarter LNNumberofnews
derivative already defined for parameter NumberofICOperquarter___0 in equation 1
r(498);
r(498);
Code:
xtgcause NumberofICOperquarter LNNumberofnews
Lag order: 1
W-bar = .
Z-bar = . (p-value = .)
Z-bar tilde = . (p-value = .)
H0: LNNumberofnews does not Granger-cause NumberofICOperquarter.
H1: LNNumberofnews does Granger-cause NumberofICOperquarter for at least one panelvar (CountryID).
The only model that works is XTVAR and it works fine but this is not compatible with a Granger causality test (?).
Hence, my questions are two:
- is there a way to fix the above errors such as the one I get with pvar?
- is there another way to run a Granger causality test considering the above?
Thank you in advance,
Cristiano
0 Response to Granger test and var (xtvar, pr
Post a Comment