When looking at change over time, we want to be able to identify trends. Often, fluctuations unrelated to the actual trend can obscure real changes that would otherwise be apparent.
Smoothing is an analytic process whereby we ‘iron out’ differences between time periods by taking the average of a fixed number of prior periods. This is also known as a moving average.
This article describes how to apply smoothing to data in Crunch and boost the ‘signal-to-noise ratio’ of noisy time series.
How it works
The following plots show the same data but oscillates between the point estimates (unsmoothed) and a 4-period moving average. The trends are clearer on the smoothed data:
In Crunch, tables, as well as graphs, can display the smoothed estimates.
Summary of steps
We explain the following steps in detail:
- Ensure you have a categorical date variable representing the survey ‘wave’
- Make a table of some variable of interest, using the wave variable in the columns
- Use the last button in the Display Controller (⋮) to set the smoothing properties
- Change the table into a time plot, if desired
Step 1: Ensure you have a categorical date variable
First, you need to have a categorical date variable. A categorical date variable is simply a categorical variable that has a date assigned to each of its categories.
The steps to set up a categorial date variable are outlined in the Defining survey wave variables article. If you don’t have Editor access to the dataset, you may need to ask a dataset Editor to set this up (e.g., a data processing department that manages your datasets).
In the following example, we can inspect the Properties of the variable titled ‘Wave’ to verify that it is a categorical date variable. We can see that the Subtype is set to Date and there is a date assigned to each wave category (at the monthly level, in the format YYYY-MM). In this case, each wave is a successive month in 2019:
Step 2: Use the categorical date variable as the columns in a crosstab
You simply use the categorical date variable mentioned in Step 1 as the columns of a table (or groups of a graph), via drag-drop into the Column (or Groups) drop-zone:
Step 3: Use the last button in the Display Controller to set the smoothing properties
In the Display Controller (the bar that appears at the bottom of the screen) use the button on the far right with the three dots to access the properties panel, which will slide up from the bottom.
Go to the Smoothing tab. If you don’t see the Smoothing tab (ie: you only see the Display tab), your column variable is not a categorical date variable (see step 1).
Change the smoothing method to “One-sided moving average” and set the number of prior periods to include at each point:
You’ll notice the following on tables with smoothed values:
- There is a footnote in the bottom left corner noting the type of moving average
- Example: “Values shown are 4-period one-sided moving averages.”
- Columns with missing data will have a dash (—) to denote there is not enough data to produce a moving average.
- For example, if you have a 4-period moving average, then the first three periods will be blank.
- The (base) N row will remain unchanged for all the columns (periods), irrespective of the moving average smoothing the figures in the cells of the table.
Step 4: Change into a time plot, if desired, and/or save to a deck
Again, this is a simple use of the Display Controller.
Smoothed data tends to look best with time plots, stacked bars, or vertical bars.
You can save your analysis to the deck, and the smoothed properties will be saved with the deck slide. These are reflected in your exports to PowerPoint and Excel and in Crunch dashboard tiles.
Frequently asked questions
Can I export my smoothed table or graph to Excel or PowerPoint?
Yes. Simply save to a deck and export in the usual way.
Can I use my smoothed data in a dashboard?
Yes. Simply save to the deck that forms the basis of your dashboard.
Is hypothesis testing available for smoothed data?
Not at this time.
Are any other types of moving averages available than simple one-sided?
Not at this time. Crunch may consider other types of moving averages in the future.
What if I want to make smoothing-related changes to a saved analysis?
Options for enabling/disabling smoothing or changing the number of periods are accessible in the Edit Slide/Tile panel.