Am 06.02.2020 um 22:09 schrieb Allin Cottrell:
The business with VAR standard errors was due to a crucial
difference
between the "old" lapack SVD solver, dgelss(), and the "new", faster
dgelsd (divide-and-conquer variant) that I failed to notice at first.
That is, dgelss leaves the right-hand singular vectors in the input
matrix X on successful exit -- which provides a nice quick way of
computing (X'X)^{-1} -- while dgelsd leaves nothing but rubble in X. So
our (X'X)^{-1} computed after dgelsd was garbage. Solution: revert to
dgelss if (X'X)^{-1} is needed.
Thanks Allin - I feel partly guilty because I suggested the switch to
the faster versions. What I don't understand, though: Isn't (X'X)^{-1}
always needed? I mean we have the $xtxinv accessor after a VAR which
should always contain valid stuff.
I also found another SVD issue: the tall_SVD() function (SVD via
eigen-analysis) is much faster than regular lapack SVD for the case
where X has a lot more columns than rows, but as it's not accurate for
singular or near-singular input. It's therefore not suitable as a
back-end for rank determination or for computation of a generalized
inverse. I've therefore ensured that such functions call regular lapack
SVD internally.
OK, very good. When the dust is settled let's see what the speedups are
between 2019d and 2020a in this linear-algebra area.
cheers
sven