Dear all,
Today I was reading the Function Reference when it confused me that the
argument for var() or sd() should be a list or a series. However, having a
one-column matrix (named MAT) at hand, I tried
scalar sdM = sd(MAT)
and obtained a correct result. When a matrix with multiple columns was fed
in, an error was not slow to arrive.
Does it mean that these functions fully support one-column matrices as
arguments? If yes, could you mention it in the Function Reference? If it is
a slippery slope, could you state it in the Reference that “for matrices
other than n×1, it produce an error, whereas for n×1 matrices it will yield
the result, which, however, has something to do with matrix-series
conversion and it is strongly advised to explicitly prepare such a series
before”? (Of course, the latter is so undesirable, especially when the
length of the one-column matrix differs from the length of the dataset!)
--
Yours sincerely, | С уважением,
Andreï V. Kostyrka. | Андрей Викторович Костырка.
http://kostyrka.ru,
http://kostyrka.ru/blog