Previous Page | Next Page

Working with Time Series Data

Log Transformation

The logarithmic transformation is often useful for series that must be greater than zero and that grow exponentially. For example, Figure 3.17 shows a plot of an airline passenger miles series. Notice that the series has exponential growth and the variability of the series increases over time. Airline passenger miles must also be zero or greater.

Figure 3.17 Airline Series
Airline Series

The following statements compute the logarithms of the airline series:

   data lair;
      set sashelp.air;
      logair = log( air );
   run;

Figure 3.18 shows a plot of the log-transformed airline series. Notice that the log series has a linear trend and constant variance.

Figure 3.18 Log Airline Series
Log Airline Series

The %LOGTEST macro can help you decide if a log transformation is appropriate for a series. See Chapter 5, SAS Macros and Functions, for more information about the %LOGTEST macro.

Previous Page | Next Page | Top of Page