On Mon, Jun 6, 2022 at 12:13 PM Sven Schreiber <svetosch(a)gmx.net> wrote:
What might be useful is to check out the database of singular matrices
at San Jose State U. (It's astounding what things exist in science!)
Most of the matrices in that database are square. From the point of
view of libgretl I'm particularly interested in the case m > n, since
our internal usage of QR is mostly confined to such cases (matrices of
regressors or instruments, where we'd generally expect m >> n). The
"NYPA" group in the database contains such matrices. There's one case
of full "structural rank" and the other matrices are rank-deficient.
All of them have "numerical rank" (assessed via SVD) < "structural
rank".
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.)
Allin