I am trying to fit a VARMAX (vector autoregressive moving-average with exogenous variables) model to some synthetically generated data using the MTS library available in R. I found that there is only one function for fitting models with exogenous variables, it is designed for only VAR models and is called VARX. Reading in the literature, I found that there is a method for finding the VARX representation of the VARMAX model (not that straightforward), thus, finding the VARX representation of the VARMAX model, the VARX function could be used. My question is: Is there any method already implemented in R that transforms VARMAX, VARMA, VMAX into their corresponding VAR representation or how the VARX function must be used for fitting models of this type?
In the following reproducible example is generated an VARMAX model intending to estimate their parameters with VARX function:
library(MTS) set.seed(2015) Phi<-matrix(c(0.5,0.2,0.2,0.3),ncol=2) Theta<-matrix(c(0.4,0.3,0.2,0.5),ncol=2) Sigma <- matrix(c(1,0.2,0.2,1),ncol=2) serie_varmax<-VARMAsim(60,arlags=c(1),malags=c(1),phi=Phi,theta=Theta,sigma=Sigma)$series exoge1<-serie_varmax[,1]+(0.3*seq(1,60)) #Exogenous variable influencing only the first variable serie1<-cbind(exoge1,serie_varmax[,2])
As aforementioned, I am wondering how to estimate the VARMAX coefficients using VARX function.