|
Chapter Contents |
Previous |
Next |
| SAS Macros and Functions |
Transformations of the dependent variable are a useful way of dealing with nonlinear relationships or heteroscedasticity. For example, the logarithmic transformation is often used for modeling and forecasting time series that show exponential growth or that show variability proportional to the level of the series.
The Box-Cox transformation is a general class of power transformations that include the log transformation and no-transformation as special cases. The Box-Cox transformation is

The constant c is optional. It can be used when some Xt values are negative or 0. You choose c so that the series Xt is always greater than - c.
The %BOXCOXAR macro tries a range of
values and
reports which of the values tried produces the optimal Box-Cox transformation.
To evaluate different
values,
the %BOXCOXAR macro transforms the series with each
value
and fits an autoregressive model to the transformed series.
It is assumed that this autoregressive model is a reasonably good
approximation to the true time series model appropriate
for the transformed series.
The likelihood of the data under each autoregressive model is computed,
and the
value producing the maximum likelihood over
the values tried is reported as the optimal Box-Cox transformation
for the series.
The %BOXCOXAR macro prints and optionally writes to a SAS data set
all of the
values tried and the corresponding
log likelihood value and related statistics
for the autoregressive model.
You can control the range and number of
values tried.
You can also control the order of the autoregressive models fit to the
transformed series.
You can difference the transformed series before the autoregressive
model is fit.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.