Get startedGet started for free

Lagging and differencing

1. Lagging and differencing

Another important component of time series data manipulation is generating moving indicators from your data. Two common types of moving indicators are lags and differences.

2. Lagging

As you may recall from the previous course, a lag offsets the value of your time series data by a certain number of periods. This is an extremely useful metric for time series analysis, especially when you think the effect of one variable takes a while to set in. For example, if you're interested in how economic trends influence the tourism industry, you should keep in mind that tourists often plan their trips far in advance. In this context, it makes sense to lag our data to allow economic changes to have an effect.

3. Differencing

A time series difference takes this idea one step further. Rather than simply taking the value of your time series at each period, a difference tells you how much your measure has changed since some prior period. If you're interested in economic growth, it may make sense to focus on the difference in unemployment from one period to another, rather than values at any give time.

4. Let's practice!

In the next few exercises, you'll generate some useful lags and difference values in your economic data. OK, let's get to work!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.