On Tue, 12 Nov 2019, Sven Schreiber wrote:
> 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.
Yes, why not. I think I would like 'stdize' best. (Don't know what
exactly scale does in R, but it sounds even more general.)
Proposal:
stdize
Output: same as input
Arguments: Y (matrix or list)
flag (integer)
Returns the demeaned version of the data contained in Y, optionally
scaling each series/column by a normalizing factor, as dictated by the
optional argument flag. If flag = 0 (the default), no scaling is
performed. Otherwise, the sample standard deviation is used, with two
possible variants: with or without the degrees-of-freedom adjustment (flag
= 1 or 2, respectively).
-------------------------------------------------------
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
-------------------------------------------------------