On Mon, 8 May 2023, Sven Schreiber wrote:
Am 08.05.2023 um 21:33 schrieb Cottrell, Allin:
> On Mon, May 8, 2023 at 12:24 PM Riccardo (Jack) Lucchetti
> <p002264(a)staff.univpm.it> wrote:
>> The inconsistency lies in the fact that the result of nullspace() is
>> normalised by equating the largest element to 1 if has one column, and to
>> be orthonormal otherwise. This may be a little unfortunate if one assumes
>> (as I was doing) that the result is always orthonormal.
> I agree, this doesn't look nice. Not sure why we thought it was a good
> idea in the first place.
I don't remember, either, but I noticed that apart from normalize_nullspace()
in lib/src/gretl_matrix.c there's also a nullspace_normalize function in
plugin/jrestrict.c. If the latter is specific to cointegration stuff, I think
it would be good if the function name reflected that. If, OTOH, it's a
general algebra function, maybe it should also live in
lib/src/gretl_matrix.c, and its relationship with the former function should
be clarified.
It is specific to cointegration stuff (actually: to the special case when
restrictions involve the loading matrix alpha), so I'd leave it where it
is. As for the idea of renaming it, I don't see a pressing case: after
all, it's marked static and it's not going to pollute any namespace
outside that context, where its purpose is rather clear. But if we were to
choose a more informative name, do you have suggestions?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------