On Tue, 9 Jul 2013, cociuba mihai wrote:
I'm testing Granger causality between inflation and inflation
uncertainty for 15 countries and I would like to retrieve the
result of the Wald test...
What Wald test? (That is, for what null hypothesis?)
in a matrix, the script that I try to run gets stuck at the last
step. Any suggestion are welcome.
[last step]
loop foreach i a b c d
var $i M1 R --nc
F_stat[$i,] = $test ~ $pvalue
endloop
The "var" command in gretl does not supply a $test accessor. In fact
no model estimation command in gretl does that: the label "test" is
much too general, given that many sorts of tests might be
contemplated after estimating a given model (either single-equation
or multi-equation).
Since a VAR is just a collection of equations related in a certain
way (identical right-hand sides, specific relation between left-hand
side variables and right-hand sides), estimated in practice via OLS,
you can get whatever Wald statistics you want by estimating the
equations singly via the "ols" command, and using either "omit" or
"restrict" (which do produce $test and $pvalue).
(I suppose we could generalize the current scalar $Fstat accessor
for single equation models to a matrix for VARs, but that would
require some decisions on which F-stats to include and in what
configuration.)
Allin Cottrell