Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Working with Time Series Data

Lags, Leads, Differences, and Summations

When working with time series data, you sometimes need to refer to the values of a series in previous or future periods. For example, the usual interest in the consumer price index series shown in previous examples is how fast the index is changing, rather than the actual level of the index. To compute a percent change, you need both the current and the previous values of the series. When modeling a time series, you may want to use the previous values of other series as explanatory variables.

This section discusses how to use the DATA step to perform operations over time: lags, differences, leads, summations over time, and percent changes.

The EXPAND procedure can also be used to perform many of these operations; see Chapter 11, "The EXPAND Procedure," for more information. See also the section "Transforming Time Series" later in this chapter.


The LAG and DIF Functions

Multiperiod Lags and Higher-Order Differencing

Percent Change Calculations

Leading Series

Summing Series

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.