Language Reference

VARMASIM Call

generates a VARMA(p,q) time series

CALL VARMASIM( series, phi, theta, mu, sigma, n <, p, q, initial, seed>);

The inputs to the VARMASIM subroutine are as follows:


phi
specifies a km_p x k matrix containing the autoregressive coefficient matrices, where m_p is the number of the elements in the subset of the AR order and k\geq 2 is the number of variables. You must specify either phi or theta.

theta
specifies a km_q x k matrix containing the moving-average coefficient matrices, where m_q is the number of the elements in the subset of the MA order. You must specify either phi or theta.

mu
specifies a k x 1 (or 1 x k) mean vector of the series. If mu is not specified, a zero vector is used.

sigma
specifies a k x k covariance matrix of the innovation series. If sigma is not specified, an identity matrix is used.

n
specifies the length of the series. If n is not specified, n=100 is used.

p
specifies the subset of the AR order. See the VARMACOV subroutine.

q
specifies the subset of the MA order. See the VARMACOV subroutine.

initial
specifies the initial values of random variables. If initial=a_0, then y_{-p+1}, ... ,y_{0} and {\epsilon}_{-q+1}, ... , {\epsilon}_{0} all take the same value a_0. If the initial option is not specified, the initial values are estimated for the stationary vector time series; the initial values are assumed as zero for the nonstationary vector time series.

seed
is a scalar containing the random number seed. At the first execution of the subroutine, the seed variable is used as follows:

If seed > 0, the input seed is used for generating the series.

If seed = 0, the system clock is used to generate the seed.

If seed < 0, the value (-1)x(seed) is used for generating the series.

If the seed is not supplied, the system clock is used to generate the seed.

On subsequent calls of the subroutine in the DO loop like environment the seed variable is used as follows: If seed > 0, the seed remains unchanged. In other cases, after each execution of the subroutine, the current seed is updated internally.

The VARMASIM subroutine returns the following value:


series
is an nx k matrix containing the generated VARMA(p,q) time series. When either the initial option is specified or zero initial values are used, these initial values are not included in series.

Consider the following bivariate (k=2) stationary VARMA(1,1) time series:
y_t - {\mu} = \phi ( y_{t-1} - {\mu} ) +    {\epsilon}_t - \theta {\epsilon}_{t-1}

\phi=[\matrix{1.2 & -0.5 \cr    0.6 & 0.3 \cr    }]   \theta=[\matrix{-0.6 & 0.3 \c...   ...u}=[\matrix{10 \cr 20 \cr}]   \sigma=[\matrix{1.0 & 0.5 \cr    0.5 & 1.25\cr    }]
To generate this series, you can use the following statements:
  
   phi  = { 1.2 -0.5, 0.6 0.3 }; 
   theta= {-0.6  0.3, 0.3 0.6 }; 
   mu   = { 10, 20 }; 
   sigma= { 1.0  0.5, 0.5 1.25}; 
   call varmasim(yt, phi, theta, mu, sigma, 100);
 


Consider a bivariate (k=2) nonstationary VARMA(1,1) time series with the same {\mu}, \sigma, and \theta in the previous example and the following AR coefficient:
\phi=[\matrix{1.0 & 0 \cr    0 & 0.3 \cr    }]
To generate this series, you can use the following statements:
  
   phi  = { 1.0 0.0, 0.0 0.3 }; 
   call varmasim(yt, phi, theta, mu, sigma, 100) initial=3;
 

Previous Page | Next Page | Top of Page