On Wed, 20 Jul 2011, Davor Horvatic wrote:
In this post I'll be as detailed as I can be. In attachment you
will find time series used to reproduce numbers mentioned below.
I'm wondering why is there discrepancy in std errors between GIG
on one side and Eviews on the other. I.e. to be precise difference
between Sandwich (default) and OPG or Hessian as VCV method. As
you will see I get similar results for Eviews and GIG for all
cases except for default Sandwich estimator.
[...] I have problem that parameters that are significant in with
GIG (OPG) and Eviews are not so significant any more in GIG
(Sandwich). WIG is just one example.
Here is a script which replicates your results and does a relevant
check to demonstrate that gig's Sandwich covariance estimator is
correct, as a sandwich of the inverse Hessian and the Outer Product
matrix:
<hansl>
include gig.gfn
open WIG.csv -q
series rr1 = ldiff(WIG)
model = gig_setup(rr1, 3)
gig_estimate(&model) # Sandwich
matrix VS = model["vcv"]
model["vcvtype"] = 1
gig_estimate(&model) # Hessian
matrix VHess = model["vcv"]
model["vcvtype"] = 2
gig_estimate(&model) # OPG
matrix VOPG = model["vcv"]
print VS VHess VOPG
matrix Vtest = qform(VHess, invpd(VOPG))
print Vtest
Vtest -= VS
print Vtest
</hansl>
In the above, we form the sandwich via
qform(VHess, invpd(VOPG))
where VH is the inverse Hessian and invpd(VOPG) is the inverse of
the OPG-based covariance which should equal the OP matrix, up to the
inevitable numerical error introduced by matrix inversion and
re-inversion on a digital computer.
You can see that Vtest is close to the original VS given by gig. The
revised version of Vtest at the end is the difference, and it's
pretty small. If you want to check with EViews you should do
something similar: grab its Hessian and OP-based covariance matrices
and calculate the sandwich.
Note one point: In the literature there are two sandwich estimators
for GARCH models: in gretl these are called the QML and the
Bollerslev-Wooldridge estimators. The first is a sandwich of the
inverse Hessian and the OP matrix, while the second is a sandwich of
the inverse Information Matrix and the OP matrix. The latter is not
offered by gig.
If the sandwich offered by EViews is the Bollerslev-Wooldridge type,
using the Information Matrix, then it would naturally not equal the
gig QML version.
Allin Cottrell