On Mon, 11 Nov 2019, Ioannis A. Venetis wrote:
Hello all,
I do not know if it has been discussed previously...
but I would like to see the cdemean() function applied to lists and why
not (for teaching and general utility) as a menu item below (e.g) the
"Add" --> 100-based indices of selected variables under the name
"Standardize variables"?
Yes, that should probably be a built-in function for series and
lists as well as columns of matrices.
If I'm remembering right we have a quite lengthy discussion of
cdemean() but with hindsight I don't think it turned out too well.
It's hard-wired to (a) just operate on matrices and (b) either just
subtract the mean, or do that plus divide by the standard deviation
with denominator n - 1. A "better" function, IMO, would allow
different types of argument and have an option to divide by the MLE
of the standard deviation.
I guess we could create a new function (stdize? center? or maybe, as
per R, scale?) which had greater generality. In that case cdemean
could be turned into an alias for the appropriate form of the new
function.
Allin