Time Series Analysis and Examples |
Generate the process following the first-order stationary vector autoregressive model with zero mean
The following statements compute the roots of characteristic function, compute the five lags of cross-covariance matrices, generate 100 observations simulated data, and evaluate the log-likelihood function of the VAR(1) model:
proc iml; /* Stationary VAR(1) model */ sig = {1.0 0.5, 0.5 1.25}; phi = {1.2 -0.5, 0.6 0.3}; call varmasim(yt,phi) sigma = sig n = 100 seed=3243; print yt; call vtsroot(root,phi); print root; call varmacov(crosscov,phi) sigma = sig lag = 5; lag = {'0','','1','','2','','3','','4','','5',''}; print lag crosscov; call varmalik(lnl,yt,phi) sigma = sig; print lnl;
Figure 10.28: Plot of Generated VAR(1) Process (VARMASIM)
The stationary VAR(1) processes show in Figure 10.28.
|
In Figure 10.29,
the first column is the real part () of the root of the
characteristic function and the second one is the imaginary part ().
The third column is the modulus, the squared root
of . The fourth column is and the last one is
the degree. Since moduli are less than one
from the third column, the series is obviously stationary.
In each matrix in Figure 10.30,
the diagonal elements are corresponding to the
autocovariance functions of each time series.
The off-diagonal elements are corresponding to the cross-covariance
functions of between two series.
|
In Figure 10.31, the first row is the value of log-likelihood function; the second row is the sum of log determinant of the innovation variance; the last row is the weighted sum of squares of residuals.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.