Chapter Contents
Chapter Contents
Time Series Analysis and Control Examples

Nonstationary Time Series

The subroutines TSMLOCAR, TSMLOMAR, and TSTVCAR are used to analyze nonstationary time series models. The AIC statistic is extensively used to analyze the locally stationary model.

Locally Stationary AR Model

When the time series is nonstationary, the TSMLOCAR (univariate) and TSMLOMAR (multivariate) subroutines can be employed. The whole span of the series is divided into locally stationary blocks of data, and then the TSMLOCAR and TSMLOMAR subroutines estimate a stationary AR model by using the least squares method on this stationary block. The homogeneity of two different blocks of data is tested using the AIC.

Given a set of data {y1, ... ,yT}, the data can be divided into k blocks of sizes t1, ... ,tk, where t1 + ... + tk = T, and k and ti are unknown. The locally stationary model is fitted to the data

y_t = \alpha_0^i + \sum_{j=1}^{p_i} \alpha_j^i y_{t-j} + 
T_{i-1} = \sum_{j=1}^{i-1} t_j \lt t \leq T_i = \sum_{j=1}^i t_j,
 \hspace*{0.25in}{ for } i=1, ... ,k
where \epsilon_t^i is a Gaussian white noise with {\rm E} \epsilon_t^i = 0 and {\rm E}(\epsilon_t^i)^2 = \sigma_i^2.Therefore, the log likelihood function of the locally stationary series is
\ell = -\frac{1}2\sum_{i=1}^k
 [ t_i\log(2 \pi \sigma_i^2) + \frac{1}{\sigma_i^2...
 ( y_t - \alpha_0^i - 
 \sum_{j=1}^{p_i} \alpha_j^i y_{t-j}
Given \alpha_j^i, j = 0, ... ,pi, the maximum of the log likelihood function is attained at
\hat{\sigma}_i^2 = 
\frac{1}{t_i} \sum_{t=T_{i-1}+1}^{T_i}
( y_t - \hat{\alpha}_0^i - 
 \sum_{j=1}^{p_i} \hat{\alpha}_j^i y_{t-j}
The concentrated log likelihood function is given by
\ell^* = - \frac{T}2[1 + \log(2 \pi)] 
 - \frac{1}2 \sum_{i=1}^k t_i \log(\hat{\sigma}_i^2)
Therefore, the maximum likelihood estimates, \hat{\alpha}_j^i and \hat{\sigma}_i^2, are obtained by minimizing the following local SSE:
{\rm SSE} = \sum_{t=T_{i-1}+1}^{T_i}
 ( y_t - \hat{\alpha}_0^i - \sum_{j=1}^{p_i}
 \hat{\alpha}_j^i y_{t-j}
The least squares estimation of the stationary model is explained in the section, "Least Squares and Householder Transformation".

The AIC for the locally stationary model over the pooled data is written as

\sum_{i=1}^k t_i \log(\hat{\sigma}_i^2) + 
2\sum_{i=1}^k (p_i + {intercept}+1)
where intercept = 1 if the intercept term (\alpha_0^i) is estimated; otherwise, intercept = 0. The number of stationary blocks (k), the size of each block (ti), and the order of the locally stationary model is determined by the AIC. Consider the autoregressive model fitted over the block of data, {y1, ... ,yT}, and let this model M1 be an AR(p1) process. When additional data, {yT+1, ... ,yT+T1}, are available, a new model M2, an AR(p2) process, is fitted over this new data set, assuming that these data are independent of the previous data. Then AICs for models M1 and M2 are defined as
{\rm AIC}_1 & = & T \log(\sigma_1^2) + 
 2(p_1 + {intercept} + 1) \{\rm AIC}_2 & = & T_1 \log(\sigma_2^2) + 
 2(p_2 + {intercept} + 1)
The joint model AIC for M1 and M2 is obtained by summation

When the two data sets are pooled and estimated over the pooled data set, {y1, ... ,yT+T1}, the AIC of the pooled model is

{\rm AIC}_A = (T + T_1) \log(\hat{\sigma}_A^2) + 
 2(p_A + {intercept} + 1)
where \sigma^2_A is the pooled error variance and pA is the order chosen to fit the pooled data set.


If new observations are available, repeat the preceding steps to determine the homogeneity of the data. The basic idea of locally stationary AR modeling is that, if the structure of the time series is not changed, you should use the additional information to improve the model fitting, but you need to follow the new structure of the time series if there is any change.

Time-Varying AR Coefficient Model

Another approach to nonstationary time series, especially those that are nonstationary in the covariance, is time-varying AR coefficient modeling. When the time series is nonstationary in the covariance, the problem in modeling this series is related to an efficient parameterization. It is possible for a Bayesian approach to estimate the model with a large number of implicit parameters of the complex structure by using a relatively small number of hyperparameters.

The TSTVCAR subroutine uses smoothness priors by imposing stochastically perturbed difference equation constraints on each AR coefficient and frequency response function. The variance of each AR coefficient distribution constitutes a hyperparameter included in the state space model. The likelihood of these hyperparameters is computed by the Kalman filter recursive algorithm.

The time-varying AR coefficient model is written

y_t = \sum_{i=1}^m \alpha_{it} y_{t-i} + \epsilon_t
where time-varying coefficients \alpha_{it} are assumed to change gradually with time. The following simple stochastic difference equation constraint is imposed on each coefficient:
\nabla^k \alpha_{it} = w_{it}, \hspace*{0.25in} 
w_{it} \sim N(0,\tau^2), \hspace*{0.25in} i=1, ... ,m
The frequency response function of the AR process is written
A(f) = 1 - \sum_{j=1}^m \alpha_{jt} \exp(-2 \pi jif)
The smoothness of this function can be measured by the kth derivative smoothness constraint,
R_k = \int_{-1/2}^{1/2} | \frac{d^k A(f)}{df^k} |^2 df
 = (2 \pi)^{2k} \sum_{j=1}^m j^{2k} \alpha_{jt}^2
Then the TSTVCAR call imposes zero and second derivative smoothness constraints. The time-varying AR coefficients are the solution of the following constrained least squares:
( y_t - \sum_{i=1}^m \alpha_{it} y_{t-i} )^2 + 
\tau^2 \sum_{t=1}^...
 ... \sum_{i=1}^m i^2 \alpha_{it}^2 + 
\nu^2 \sum_{t=1}^T \sum_{i=1}^m \alpha_{it}^2
where \tau^2, \lambda^2, and \nu^2 are hyperparameters of the prior distribution.

Using a state space representation, the model is

x_t & = & F{x}_{t-1} + G{w}_t \y_t & = & H_t{x}_t + \epsilon_t
x_t & = & (\alpha_{1t}, ... ,\alpha_{mt}, ... ,
 \alpha_{1,t-k+1}, ... ,\alpha_{...
 ] \[ w_t \ 
 ] & \sim & N (0, [ \tau^2{I}& 0 \ 0 & \sigma^2
The computation of the likelihood function is straightforward. See the section, "State Space and Kalman Filter Method" for the computation method.

Chapter Contents
Chapter Contents

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