Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

ARMACOV Call

computes an autocovariance sequence for an ARMA model

CALL ARMACOV( auto, cross, convol, phi, theta, num);

The inputs to the ARMACOV subroutine are as follows:
phi
refers to a 1 ×(p+1) matrix containing the autoregressive parameters. The first element is assumed to have the value 1.

theta
refers to a 1 ×(q+1) matrix containing the moving-average parameters. The first element is assumed to have the value 1.

num
refers to a scalar containing n, the number of autocovariances to be computed, which must be a positive number.
The ARMACOV subroutine returns the following values:
auto
specifies a variable to contain the returned 1 ×n matrix containing the autocovariances of the specified ARMA model, assuming unit variance for the innovation sequence.

cross
specifies a variable to contain the returned 1 ×(q+1) matrix containing the covariances of the moving-average term with lagged values of the process.

convol
specifies a variable to contain the returned 1 ×(q+1) matrix containing the autocovariance sequence of the moving-average term.
The ARMACOV subroutine computes the autocovariance sequence that corresponds to a given autoregressive moving-average (ARMA) time-series model. An arbitrary number of terms in the sequence can be requested. Two related covariance sequences are also returned.

The model notation for the ARMACOV and ARMALIK subroutines is the same. The ARMA(p,q) model is denoted
\sum_{j=0}^p \phi_j y_{t-j} = \sum_{i=0}^q \theta_i \epsilon_{t-i}
with \theta_0 = \phi_0 = 1.The notation is the same as that of Box and Jenkins (1976) except that the model parameters are opposite in sign. The innovations \{\epsilon_t\} satisfy E(\epsilon_t)=0 and E(\epsilon_t \epsilon_{t-k})=1 if k=0, and are zero otherwise. The formula for the kth element of the convol argument is
\sum_{i=k-1}^q \theta_i \theta_{i-k+1}
for k = 1,2, ... ,q+1. The formula for the kth element of the cross argument is
\sum_{i=k-1}^q \theta_i \psi_{i-k+1}
for k = 1,2, ... ,q+1, where \psi_i is the ith impulse response value. The \psi_i sequence, if desired, can be computed with the RATIO function. It can be shown that \psi_k is the same as E(Y_{t-k} \epsilon^2_t)/\sigma, which is used by Box and Jenkins (1976, p. 75) in their formulation of the autocovariances. The kth autocovariance, denoted \gamma_k and returned as the k+1 element of the auto argument (k = 0,1, ... ,n-1), is defined implicitly for k>0 by
\sum_{i=0}^p \gamma_{k-i} \phi_i = \eta_k
where \eta_k is the kth element of the cross argument. See Box and Jenkins (1976) or McLeod (1975) for more information.

To compute the autocovariance function at lags zero through four for the model
yt= 0.5yt-1 + et + 0.8et-1
use the following statements:
   proc iml;
         /* an arma(1,1) model */
      phi  ={1 -0.5};
      theta={1 0.8};
      call armacov(auto,cross,convol,phi,theta,5);
      print auto,,cross convol;
The result is
               AUTO
          3.2533333 2.4266667 1.2133333 0.6066667 0.3033333


                    CROSS              CONVOL
                     2.04       0.8      1.64       0.8

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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