Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
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 2.21 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 passerger miles must also be zero or greater.

tsdgs22.gif (4838 bytes)

Figure 2.21: Airline Series

The following statements compute the logarithms of the airline series:

   data a;
      set a;
      logair = log( air );
   run;

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

tsdgs23.gif (4767 bytes)

Figure 2.22: Log Airline Series

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

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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