StatLabStudent EditionUser guideGalleryFeaturesAbout

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?

What are the assumptions?

How do I run it in StatLab?

  1. Choose the variable, the function and the span; the new variable is added to the data.

How do I read the output?

OutputMeaning
Created SeriesName, 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?

Open StatLab   All guide topics