On Tue, 12 Nov 2019, Sven Schreiber wrote:
Am 12.11.2019 um 17:59 schrieb Riccardo (Jack) Lucchetti:
> On Tue, 12 Nov 2019, Sven Schreiber wrote:
> > 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.
Actually, for a name 'stdize' I would like to have the division by the
SD as the default. Otherwise go back to the name 'center' or 'demean' or
whatever.
> Otherwise, the sample standard deviation is used, with two possible
> variants: with or without the degrees-of-freedom adjustment (flag = 1
> or 2, respectively).
The last time we discussed this Allin didn't want to have the two
options rolled into one argument, although I didn't really understand
why. Let's see what his reaction is going to be this time ;-)
OK ;-)
I agree with Sven on the default, and somehow my objection to rolling
the two options into a single argument seems to have faded. How about:
flag = 0 -> dfcorr = 0 (MLE)
flag = k > 0 -> dfcorr = k
flag = -1 -> centering only
with a default of 1 if the optional second argument isn't given.
Allin