On Sat, 14 Apr 2018, Sven Schreiber wrote:
Am 14.04.2018 um 15:08 schrieb Riccardo (Jack) Lucchetti:
> On Sat, 14 Apr 2018, Riccardo (Jack) Lucchetti wrote:
>
>> The following implementation looks reasonably efficient to me.
>
> [...]
>
> And, by the way, lends itself quite nicely to also implementing VAR
> prewhitening à la Andrews:
Thanks; and speaking about VARs, it is possible to ask gretl for HAC
cov-estimation there, too. (See also section 19.3 of the guide.) The HAC
errors internally use an estimate of the long-run variance of the residuals,
I would expect, right? That would mean that the necessary code is already in
gretl (in C), it's just not accessible at the hansl level - is that correct?
I think so. You could browse lib/src/qr_estimate.c, which contains
most of the HAC-related code. The relevant section starts with the
function wtw() and continues through qr_make_hac().
Allin