# VARMAsim: Generating a VARMA Process In MTS: All-Purpose Toolkit for Analyzing Multivariate Time Series (MTS) and Estimating Multivariate Volatility Models

## Description

Performs simulation of a given VARMA model

## Usage

 ```1 2 3``` ```VARMAsim(nobs, arlags = NULL, malags = NULL, cnst = NULL, phi = NULL, theta = NULL, skip = 200, sigma) ```

## Arguments

 `nobs` Sample size `arlags` The exact lags of the VAR matrix polynomial. `malags` The exact lags of the VMA matrix polynomial. `cnst` Constant vector, Phi0 `phi` Matrix of VAR coefficient matrices in the order of the given arlags. `theta` Matrix of VMA coefficient matrices in the order of the given malags. `skip` The number of initial data to be omitted. Deafult is 200. `sigma` Covariance matrix (k-by-k, positive definite) of the innovations

## Details

Use multivariate Gaussian distribution to generate random shocks. Then, generate a given VARMA model. The first skip data points were discarded.

## Value

 `series` Generated series `noises` The noise series

Ruey S. Tsay

## References

Tsay (2014, Chapter 3). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.

## Examples

 ```1 2 3 4 5``` ```p1=matrix(c(0.2,-0.6,0.3,1,1),2,2) sig=matrix(c(4,0.8,0.8,1),2,2) th1=matrix(c(-0.5,0,0,-0.6),2,2) m1=VARMAsim(300,arlags=c(1),malags=c(1),phi=p1,theta=th1,sigma=sig) zt=m1\$series ```

### Example output

```Warning message:
In matrix(c(0.2, -0.6, 0.3, 1, 1), 2, 2) :
data length [5] is not a sub-multiple or multiple of the number of rows [2]
```

MTS documentation built on May 29, 2017, 5:15 p.m.