Hi,
using current git on Ubuntu 19.04, I obtain wrong values for the
centered moving average:
<hansl>
clear
set verbose off
nulldata 10
setobs 1 1 --time-series
series S = 0
S = S(-1) + 2
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
# 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
# Works
series expmavg_p2 = movavg(S, 0.3, 1, y0) # y0 is considered
print S mavg_p2 mavg_p2_y99 cmavg_p2 cmavg_p4 expmavg_p2 -o
</hansl>
Thanks,
Artur