# VARMACpp: Vector Autoregressive Moving-Average Models (Cpp) In MTS: All-Purpose Toolkit for Analyzing Multivariate Time Series (MTS) and Estimating Multivariate Volatility Models

## Description

Performs conditional maximum likelihood estimation of a VARMA model. Multivariate Gaussian likelihood function is used. This is the same function as VARMA, with the likelihood function implemented in C++ for efficiency.

## Usage

 ```1 2 3``` ```VARMACpp(da, p = 0, q = 0, include.mean = T, fixed = NULL, beta=NULL, sebeta=NULL, prelim = F, details = F, thres = 2) ```

## Arguments

 `da` Data matrix (T-by-k) of a k-dimensional time series with sample size T. `p` AR order `q` MA order `include.mean` A logical switch to control estimation of the mean vector. Dafault is to include the mean in estimation. `fixed` A logical matrix to control zero coefficients in estimation. It is mainly used by the command refVARMA. `beta` Parameter estimates to be used in model simplification, if needed `sebeta` Standard errors of parameter estimates for use in model simplification `prelim` A logical switch to control preliminary estimation. Deafult is none. `details` A logical switch to control the amount of output. `thres` A threshold used to set zero parameter constraints based on individual t-ratio. Default is 2.

## Details

The fixed command is used for model refinement

## Value

 `data` Observed data matrix `ARorder` VAR order `MAorder` VMA order `cnst` A logical switch to include the mean vector `coef` Parameter estimates `secoef` Standard errors of the estimates `residuals` Residual matrix `Sigma` Residual covariance matrix `aic,bic` Information criteria of the fitted model `Phi` VAR coefficients `Theta` VMA coefficients `Ph0` The constant vector

Ruey S. Tsay

## References

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

VARMA

## Examples

 ```1 2 3 4 5``` ```phi=matrix(c(0.2,-0.6,0.3,1.1),2,2); theta=matrix(c(-0.5,0,0,-0.5),2,2) sigma=diag(2) m1=VARMAsim(300,arlags=c(1),malags=c(1),phi=phi,theta=theta,sigma=sigma) zt=m1\$series m2=VARMA(zt,p=1,q=1,include.mean=FALSE) ```

### Example output

```Number of parameters:  8
initial estimates:  0.198 0.3238 -0.6317 1.1405 0.4802 -0.1359 0.0227 0.4847
Par. lower-bounds:  0.0933 0.2792 -0.735 1.0965 0.3239 -0.2637 -0.1315 0.3587
Par. upper-bounds:  0.3027 0.3684 -0.5284 1.1845 0.6365 -0.0081 0.1769 0.6108
Final   Estimates:  0.1346184 0.347265 -0.5760265 1.121243 0.6144891 -0.1867544 -0.0865146 0.4662797

Coefficient(s):
Estimate  Std. Error  t value Pr(>|t|)
[1,]   0.13462     0.06828    1.972   0.0487 *
[2,]   0.34727     0.03030   11.461  < 2e-16 ***
[3,]  -0.57603     0.05880   -9.796  < 2e-16 ***
[4,]   1.12124     0.02714   41.321  < 2e-16 ***
[5,]   0.61449     0.07246    8.481  < 2e-16 ***
[6,]  -0.18675     0.04702   -3.972 7.14e-05 ***
[7,]  -0.08651     0.06166   -1.403   0.1606
[8,]   0.46628     0.05015    9.297  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
---
Estimates in matrix form:
AR coefficient matrix
AR( 1 )-matrix
[,1]  [,2]
[1,]  0.135 0.347
[2,] -0.576 1.121
MA coefficient matrix
MA( 1 )-matrix
[,1]   [,2]
[1,] -0.6145  0.187
[2,]  0.0865 -0.466

Residuals cov-matrix:
[,1]      [,2]
[1,] 0.9699665 0.0758700
[2,] 0.0758700 0.9845234
----
aic=  0.001195904
bic=  0.09996344
```

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