On Mon, 16 Apr 2018, Sven Schreiber wrote:
Am 16.04.2018 um 17:00 schrieb Allin Cottrell:
> On Mon, 16 Apr 2018, Sven Schreiber wrote:
>> Yes, it's a bit complex to track this down (at least for me). I'm looking
>> at qr_make_vcv and it seems that (only) the diagonal is multiplied with
>> pmod->sigma. My best guess so far is that that's where the factor 1/T (or
>> its square root) comes in and that actually only the diagonal of that
>> matrix is really usable.
>
> If you're computing a HAC vcv manually you don't want the "XOX"
matrix
> divided by T, since that is handled by the sandwiching with inv(X'X).
Hmm, but look at section 19.3 of the gretl guide. I take it that we refer to
X'\Omega X = Sigma as the XOX matrix (leaving hats aside). This _is_ divided
by T because all the Gammas that it is made of have the 1/T factor. And
consequently Sigma is explicitly referred to as the long-run covariance (of
X'u), irrespective of whether it's sandwiched or not.
In contrast, in HAC_XOX I only see running sums, not the 1/T factor that
makes those things an average. (But I'm not good at reading the gretl C code,
so I may have missed something.)
The difference comes from the fact that you have to scale by T if what you
want is a consistent estimator of the long-run covariance matrix of
a bunch of observable variables.
Conversely, when you use the "sandwich" estimator for the covariance
matrix a vector of estimated parameters, the scaling is unnecessary.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------