Am 11.09.19 um 19:29 schrieb Sven Schreiber:
Am 11.09.2019 um 18:35 schrieb Artur Tarassow:
> scalar y0 = 99
> scalar p = 2
>
> # Works
> series mavg_p2 = movavg(S, p)
> series mavg_p2_y99 = movavg(S, p, 0, y0) # y0 is ignored
Yes, as it should be for p>1, right?
Exactly, that's all fine. Just wanted
to show that the returned values
are correct for the standard moving-average case.
> # WRONG VALUES!
> series cmavg_p2 = movavg(S, p, 1, 99) # y0 is ignored
> series cmavg_p4 = movavg(S, 2*p, 1, y0) # y0 is ignored
So is it not centered, or are the values wrong in an "unknown" way?
It's just replicating the input series S but no (centered) moving
averages are computed.
Best,
Artur