PMA Function (CREATE command)
PMA
creates
new series based on the prior moving averages of existing series.
The prior moving average for each case in the original series is computed
by averaging the values of a span of cases preceding it.
- The specification on
PMA
is the name or names of the existing series and the span to be used, in parentheses. - Only one span can be specified and it is required. There is no default span.
- If the number of values specified for the span is not available, the case is set to system-missing. Thus, the number of cases with system-missing values at the beginning of the new series equals the number specified for the span.
- When
PMA
encounters an imbedded missing value in the existing series, it creates two subsets, one containing cases before the missing value and one containing cases after the missing value. Each subset is treated as a separate series for computational purposes. The first n cases in the second subset will be system-missing, where n is the span.
Example
CREATE PRIORA = PMA(VARA,3).
- This command creates the series PRIORA by computing prior moving averages for the series VARA. Since the span is 3, the first three cases in the series PRIORA are system-missing. The fourth case equals the average of cases 1, 2, and 3 of VARA, the fifth case equals the average of cases 2, 3, and 4 of VARA, and so on.