On 06.06.22 22:33, Cottrell, Allin wrote:
Here's what I found: gretl's (SVD) rank() agrees with the numerical rank values shown in the database. So do the results of counting abs(R[i,i]) values from QR, provided the minimal value is in the range 1.0e-10 to 1.0e-8. Plain QR and QR with column pivoting produce the same "revealed rank" in all cases. The illustrative min(R) of 1.0e-12 used upthread seems a bit too small: it gives a numerical rank slightly greater than the "official" value for 3 of the 5 specimen matrices. (Internally, we use R_DIAG_MIN = 1.0e-8.)
Thanks, Allin, that's good to know. But the (repeated) unit vector case does not seem totally irrelevant for econometrics and the dropcoll function, thinking of impulse dummies for example. Maybe your hunch provides a useful heuristic: only use column-pivoting if there's a row of zeros. (Plus the precheck for all-zeros.) OTOH, I ran some very crude and simple speed comparisons between qrdecomp with and without pivoting (on Linux, current git), and depending on the input the advantage could go either way it seemed, which I found a little surprising. But then I also ran SVD on the same input (and also grabbing the optional output), and that went even faster, so now I'm puzzled... isn't SVD supposed to be the most expensive thing of the candidates? What am I missing? thanks sven _______________________________________________ Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it Website: https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/