Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
SAS Macros and Functions

Details

Assume that a time series Xt is a stationary pth order autoregressive process with normally distributed white noise innovations. That is,

(1 - {\Theta}(B) ) (X_{t}-{\mu}_{x}) = {\epsilon}_{t}

where {\mu}_{x} is the mean of Xt.

The log likelihood function of Xt is

l_{1}({\cdot}) = &-& \frac{n}2 {\ln}(2{\pi})
- \frac{1}2 {\ln}(|{\Sigma}_{xx}|)
...
 ...-& \frac{1}{2 {\sigma}^2_{e}}
(X-1{\mu}_{x})'
 {\Sigma}^{-1}_{xx}(X-1{\mu}_{x})

where n is the number of observations, 1 is the n-dimensional column vector of 1s, {\sigma}^2_{e} is the variance of the white noise, X = (X1, ... , Xn)', and {{\Sigma}_{xx}}is the covariance matrix of X.

On the other hand, if the log transformed time series Yt = ln(Xt+c) is a stationary pth order autoregressive process, the log likelihood function of Xt is

l_{0}({\cdot}) =
&-& \frac{n}2 {\ln}(2{\pi})
- \frac{1}2 {\ln}(|{\Sigma}_{yy}|)
...
 ...-1{\mu}_{y})'
 {\Sigma}^{-1}_{yy}(Y-1{\mu}_{y})
 - \sum_{t=1}^n{{\ln}(X_{t}+c)}

where {{\mu}_{y}} is the mean of Yt, Y = (Y1, ... ,Yn)', and {{\Sigma}_{yy}} is the covariance matrix of Y.

The %LOGTEST macro compares the maximum values of l1(·) and l0(·) and determines which is larger.

The %LOGTEST macro also computes the Akaike Information Criterion (AIC), Schwarz's Bayesian Criterion (SBC), and residual mean square error based on the maximum likelihood estimator for the autoregressive model. For the mean square error, retransformation of forecasts is based on Pankratz (1983, pp. 256-258).

After differencing as specified by the DIF= option, the process is assumed to be a stationary autoregressive process. You may wish to check for stationarity of the series using the %DFTEST macro. If the process is not stationary, differencing with the DIF= option is recommended. For a process with moving average terms, a large value for the AR= option may be appropriate.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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