On Thu, 17 Dec 2020, Sven Schreiber wrote:
Hi,
I just found out that gretl's vec() and vech() functions have an
important difference: As duly documented, vec() stacks the columns (as
expected), but a little bit to my surprise vech() stacks the (relevant
parts of the) rows of the input. The latter property is not very
explicitly documented. (It just talks about the upper triangle of the
matrix, which at least is a hint in that direction.)
So basically to get the Wikipedia-style convention of the vech function
(
https://en.wikipedia.org/wiki/Vectorization_(mathematics)#Half-vectorization)
we need to work on the transpose, vech(m').
This message just serves to share this "discovery". I'm not saying we
should change vech's behavior because that would break too much stuff.
But maybe a more explicit note should be added to the documentation.
What should the message say? Seems like it would have to be
something like: If your input matrix is not symmetric, make sure the
upper triangle is what it would be if the matrix were symmetric. But
that sounds kinda redundant to me.
Allin