Am 06.06.2022 um 02:46 schrieb Cottrell, Allin:
On Sun, Jun 5, 2022 at 10:21 AM Riccardo (Jack) Lucchetti
<p002264(a)staff.univpm.it> wrote:
>
> On Sun, 5 Jun 2022, Riccardo (Jack) Lucchetti wrote:
>
>> Very nice counterxample, Sven, kudos for that. Let me think about it.
Full disclosure: I didn't invent it myself, but found it in the depths
of the net.
> In fact this bug also affects the dropcoll() built-in function:
...
> So yeah, we need to give this proper consideration.
I tend to think these are different error conditions: (a) the input
contains exactly collinear data, and (b) one or more of the input
series/columns are all zero.
But that was just an example, not the encompassing definition of the
problem.
Consider this variation without all-zero columns:
<hansl>
R = {}
A = I(4,1) ~ I(4,2)
print A
Q = qrdecomp(A , &R)
print rank(A) # correct: 2
print R
scalar r = sumc(abs(diag(R)).>1.0e-12)
print r # wrong: 1
</hansl>
cheers
sven