How to Compute a Moving Average

From Q
Jump to: navigation, search
Related Online Training modules
Time Series Plots
Generally it is best to access online training from within Q by selecting Help > Online Training


Basic method

A basic moving (rolling) average can be placed on a table using Modifying the Whole Table or Plot - Creating Rolling Averages.

General method

  1. Ensure that your date data is set up as a Date question (see Creating Date Variables).
  2. Ensure that your date question is in the appropriate unit (e.g., if you want to show a 5 month moving average, ensure that the date question shows months). See Setting Time Periods for Date Questions.
  3. Create a table with the Date question in the Brown Drop-down Menu.
  4. Right-click on the name of the series that you wish to smooth (not on the date categories) and select Time Series Analysis, which opens the dialog box shown below.
  5. Set the Moving Average as Uniform (centered) (or Lagged).
  6. Set the Bandwidth to the number of months that you wish to combine (e.g., three) and press OK.

Note that if you wish to show both the moving average and the un-smoothed data together you can copy a row in a table by left-clicking on the blue row header, holding down the Ctrl button on your keyboard and moving the mouse until the word Copy appears in a small box and then releasing the mouse button.

MovingAverageDialog.png

Personal tools
Namespaces

Variants
Actions
Navigation
Categories
Toolbox