SER Y=MA(X,<weight_description>) TO <data>
computes moving averages of X to Y according to <weight_description>.
<weight_description> can be any of the three alternatives:
1) List of weights
SER Temp2=MA(Temp,1,2,3,0,0)
i.e. Temp2[t]=1*Temp[t-2]+2*Temp[t-1]+3*Temp[t]+0*Temp[t+1]+0*Temp[t+1]
or
SER Temp3=MA(Temp,1,2,3,*) being equivalent to
SER Temp3=MA(Temp,1,2,3,2,1) (symmetric weights)
Number of weights must be uneven.
2) Name of a weight pattern
SER TempS=MA(Temp,SPENCER)
The weights for SPENCER must be given in the same edit field as
SPENCER=-3,-6,-5,3,21,46,67,74,*
3) Weights for polynomial trends
SER Temp4=MA(Temp,P3:21)
fits a cubic (P3) to sets of 21 points.
Generally Pp:m implies fitting of a polynomial of degree p
with a span of m consecutive points.
m must be an odd integer.
In all cases above, the sum of weights is scaled to 1.
SER Y=MAE(X,<weight_description>) TO <data>
works as MA, but provides trend values for the first and last m values
of the series as well.
MAE works only in the case of polynomial weights.
SER Y=MA(X,<weight_description>) TO <data> / PERIOD=s
works similarly, but uses values
..., X[t-3s], X[t-2s], X[t-s], X[t], X[t+s], X[t+2s], X[t+3s], ...
instead of
..., X[t-3], X[t-2], X[t-1], X[t], X[t+1], X[t+2], X[t+3], ...
The period s is given as an extra specification PERIOD=s.
Another way to enter the period s (say for s=3) is to use the operation
SER Y=MA3(X,<weight_description>) TO <data> .
SER Y=MAE(X,<weight_description>) TO <data> / PERIOD=s
provides smoothened values for the first and last observations as well
(in case of polynomial weights).
Alternative notation is Y=MAE3(X,... for s=3.
S = More information on SER operations