Moving averages
Adds a smoothed version of a series: the centred moving average (trend) or the prior moving average (forecast-style).
Menu: Transform → Create Time Series…
When should I use it?
- Smoothing out short-term noise to see the trend.
What are the assumptions?
- Equally spaced observations.
How do I run it in StatLab?
- Choose the variable, the function and the span; the new variable is added to the data.
How do I read the output?
| Output | Meaning |
|---|---|
| Created Series | Name, first and last non-missing case, and the function used. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC tsMovingAverage /v=score /fn=centered /span=3.
Output tables: Created Series.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Comparing a centred average with the raw series at the ends, where it is missing.