Chapter Contents |
Previous |
Next |
Working with Time Series Data |
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.
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.
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 |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.