On Sun, 15 Apr 2018, Sven Schreiber wrote:
Am 15.04.2018 um 15:51 schrieb Allin Cottrell:
> On Sun, 15 Apr 2018, Sven Schreiber wrote:
>> Plus then expose the HAC_XOX apparatus to a new hansl function lrcovar().
>> Does that sound OK?
>
> Yes. It's now in git.
Wow, that was quick! It works OK here (BTW, your new pacman setup for MSYS
seems to work fine, I could run the package update and then build from git
alright) and is about 30x faster than the hansl function for a 100x2 input
tested with 9999 repetitions. This will be very useful to implement
Newey-West style standard errors for estimators which don't have them built
in.
However, jack's longrunvar() function has an additional factor 1/T in the
result, and it seems to me this is correct (thus, missing in lrcovar as of
now).
Yes, I was thinking the magnitude looked off, and 1/T would be the
difference. It seems that gets applied at a later stage (than
HAC_XOX) in the process of constructing a HAC covariance matrix in
libgretl. But it would of course be easy to apply it within
lrcovar().
Another difference is that lrcovar(X) corresponds to longrunvar(X,
1), assuming demeaned data. The question is whether to make the
user responsible for demeaning or to offer it as an option.
Easy enough to make it an option if that's desirable.
Allin