Dear community of gretl,
I prefer writing a new post about my problem. I'm interested in testing
Granger causality from X to Y in a trivariate VAR. The critical values are
found using bootstrap based on residuals. In the first stage I consider only
the equation
ols Y const Y(-1) Y(-2) X(-1) X(-2) Z(-1) Z(-2)
Under the null hypothesis I replace the series Y using the residuals of this
equation and the coefficient estimated under the null. The test statistics is
large and observing the p-value (small) I reject the null hypothesis of no-
causality.
I have also considered the VAR model and, in the bootstrap method, I have
replace every equation of the VAR. I have used this commands:
r=158 # number of observations
system method=sur
equation Y const Y(-1) Y(-2) X(-1) X(-2) Z(-1) Z(-2)
equation X const Y(-1) Y(-2) X(-1) X(-2) Z(-1) Z(-2)
equation Z const Y(-1) Y(-2) X(-1) X(-2) Z(-1) Z(-2)
end system
genr residui=$uhat
genr M=$coeff
loop for i=3..158 --quiet
ysim[i]=M[1]+M[2]*ysim[i-1]+M[3]*ysim[i-2]+M[4]*zsim[i-1]+M[5]*zsim[i-2]
xsim[i]=M[6]+M[7]*ysim[i-1]+M[8]*ysim[i-2]+M[9]*xsim[i-1]+M[10]*xsim[i-2]+M[11]
*zsim[i-1]+M[12]*zsim[i-2]
zsim[i]=M[13]+M[14]*ysim[i-1]+M[15]*ysim[i-2]+M[16]*xsim[i-1]+M[17]*xsim[i-2]+M
[18]*zsim[i-1]+M[19]*zsim[i-2]
endloop
loop replics --quiet ### BOOTSTRAP
Ysim=ysim
Xsim=xsim
Zsim=zsim
genr A=resample(residui)
loop for i=3..r --quiet
Ysim[i]=ysim[i]+A[i-2,1]
Xsim[i]=ysim[i]+A[i-2,2]
Zsim[i]=ysim[i]+A[i-2,3]
endloop
Calculate the bootstrap test statistics and p-values
......................endloop
There is a strange result when I apply this bootstrap procedure on the VAR. In
fact the statistic test based on observed data is very large, but the bootstrap
p-value
is greater then 0.8 and I do not reject the null hypothesis of Granger non-
causality from X to Y. This results is different from the previuos which use
only the first equation.
The residuals are incorrelated. I don't understant the different between
these p-values. Are there errors in my procedure?
Best regards.
Alessandro