This section describes an adaptation of parts of the Time Series Analysis and Control (TIMSAC) package, which was developed by the Institute of Statistical Mathematics (ISM) in Japan (Kitagawa and Akaike 1981; Ishiguro 1987).
Selected routines from the TIMSAC package were converted by SAS Institute staff into SAS/IML routines under an agreement between SAS Institute and ISM. Credit for authorship of these TIMSAC SAS/IML routines goes to ISM, which has agreed to make them available to SAS users without charge.
There are four packages of TIMSAC programs. For more information about the TIMSAC package produced by ISM, see the section ISM TIMSAC Packages. Because these SAS/IML time series analysis subroutines are adapted from the corresponding FORTRAN subroutines in the TIMSAC package produced by ISM, they are collectively referred to in this chapter as "the TIMSAC subroutines."
The output of these routines is not integrated into the SAS ODS system because the FORTRAN routines print directly to the SAS listing. The output appears on the Results tab in SAS Enterprise Guide software or in the Output window of the SAS windowing environment. (Select → to display the Output window.) The output also appears in the Output window of SAS/IML Studio. However, you cannot use the ODS system to select or exclude output from these routines, nor can you view the output in ODS destinations such as HTML, PDF, or RTF.
The subroutines analyze and forecast univariate and multivariate time series data. They also analyze nonstationary time series and seasonal adjustment models. These subroutines contain the Bayesian modeling of seasonal adjustment and changing spectrum estimation.
Discrete time series modeling has been widely used to analyze dynamic systems in economics, engineering, and statistics. The Box-Jenkins and Box-Tiao approaches are classical examples of unified time series analysis through identification, estimation, and forecasting (or control). The ARIMA procedure in SAS/ETS software uses these approaches. Bayesian methods are being increasingly applied despite the controversial issues that arise in choosing a prior distribution.
The fundamental idea of the Bayesian method is that uncertainties can be explained by probabilities. If there is a class model that consists of sets of member models (), you can describe the uncertainty of by using a prior distribution of . The member model is directly related to model parameters. Let the prior probability density function be . When you observe the data that are generated from the model , the data distribution is described as , given the unknown with a prior probability density , where the function is the usual likelihood function. Then the posterior distribution is the updated prior distribution, given the sample information. The posterior probability density function is proportional to observed likelihood function prior density function.
The TIMSAC subroutines contain various time series analysis and Bayesian models. Most of the subroutines are based on the minimum Akaike information criterion (AIC) or on the minimum Akaike Bayesian information criterion (ABIC) method to determine the best model among alternative models. The TSBAYSEA subroutine is a typical example of Bayesian modeling. The following subroutines are supported:
Bayesian seasonal adjustment modeling
time series decomposition analysis
locally stationary univariate AR model fitting
locally stationary multivariate AR model fitting
multivariate AR model fitting
periodic AR model fitting
ARMA model forecasting and forecast error variance
polynomial roots or ARMA coefficients computation
time-varying coefficient AR model estimation
univariate AR model fitting
For univariate and multivariate autoregressive model estimation, the least squares method is used. The least squares estimate is an approximate maximum likelihood estimate if error disturbances are assumed to be Gaussian. The least squares method is performed by using the Householder transformation method. For more information, see the section Least Squares and Householder Transformation.
The TSUNIMAR and TSMULMAR subroutines estimate the autoregressive models and select the appropriate AR order automatically by using the minimum AIC method. The TSMLOCAR and TSMLOMAR subroutines analyze the nonstationary time series data. The Bayesian time-varying AR coefficient model (TSTVCAR) offers another nonstationary time series analysis method. The state space and Kalman filter method is systematically applied to the smoothness priors models (TSDECOMP and TSTVCAR), which have stochastically perturbed difference equation constraints. The TSBAYSEA subroutine provides a way of handling Bayesian seasonal adjustment, and it can be an alternative to the X11 procedure in SAS/ETS. The TSBAYSEA subroutine employs the smoothness priors idea through constrained least squares estimation, whereas the TSDECOMP and TSTVCAR subroutines estimate the smoothness trade-off parameters by using the state space model and Kalman filter recursive computation. The TSPRED subroutine computes the one-step or multistep predicted values of the ARMA time series model. In addition, the TSPRED subroutine computes forecast error variances and impulse response functions. The TSROOT subroutine computes the AR and MA coefficients, given the characteristic roots of the polynomial equation and the characteristic roots of the AR or MA model.