Personally I also agree with Stefano (something like rescale or rescale
itself). Of course in this case - strictly speaking - the demeaning
option is not rescaling.
I agree with Jack that maybe recursive demeaning goes a long way (let
alone rolling ;) ). But...
_I wouldn't endow a function with too many options, I find that very
R-ish,_
_but maybe it's just me. Anyway, recursive demeaning (that I have never_
_seen used anywhere, I'd be curious to see a real-life use case) is
easy_
_enough to do in hansl:_
_<hansl>_
_X = mnormal(20,3)_
_M = X - cum(X) ./ seq(1, rows(X))'_
_</hansl>_
Jack (and anyone interested in), have a look in section 3.2, p.585
Michael W. McCracken & Serena Ng (2016) FRED-MD: A Monthly Database
for Macroeconomic Research, Journal of Business & Economic Statistics,
34:4, 574-589, DOI:
10.1080/07350015.2015.1086655
This (recursive standardization) is a feature that I would like to see
in the staticfactor package and at a later stage in the DFM package
(just to replicate some of those results as in McCracken). Of course, I
am not sure (because i have not given a thought) about the theoretical
arguments that would support Principal Components estimation or other
estimators on recursively demeaned and/or standardized data (moment
conditions, consistency, convergence rates).
Apparently, I had - slightly changed - the source code in staticfactor
package quite a while ago to replicate the papers diffusion index.
Yiannis
Show replies by date