This section describes an adaptation of parts of the Time Series Analysis and Control (TIMSAC) package developed by the Institute of Statistical Mathematics (ISM) in Japan.
Selected routines from the TIMSAC package from ISM 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. See the section ISM TIMSAC Packages for more information about the TIMSAC package produced by ISM. Since 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 as “the TIMSAC subroutines” in this chapter.
The subroutines analyze and forecast univariate and multivariate time series data. The nonstationary time series and seasonal adjustment models can also be analyzed by using the Interactive Matrix Language TIMSAC subroutines. 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 the SAS/ETS product uses these approaches. Bayesian methods are being increasingly applied despite the controversial issues involved 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 is 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. See the section Least Squares and Householder Transformation for details.
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 SAS/ETS X-11 procedure. The TSBAYSEA subroutine employs the smoothness priors idea through constrained least squares estimation, while the TSDECOMP and TSTVCAR subroutines estimate the smoothness tradeoff 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 for the AR or MA model.