Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fit an VARMA time series model in R?

I have a multivariate time series with four variables, x1, x2, x3, x4 (or called four univariate time series X1, X2, X3, X4). After examining each series, I found that each of them would be an ARIMA model. After differencing each univariate time series, I've got the stationary ARMA model for each series, for example series X1 seems to be an ARMA(1,2) and series X2 seems to be an ARMA(1,3) model.

My problem is how to fit a vector ARMA model (or say VARMA model) in R, I've found some packages 'dlm' or 'dse' in R, but there are more introduction on ARMA instead of VARMA.

My plan is to add these four models together to be a multi-series, something like:

multi<-(ARMA(1,2)+ARMA(1,3)+ARMA(1,0)+ARMA(1,5)) multi.fit<-fit(multi)

Any suggestions will be appreciated.

like image 712
Jiac Avatar asked Jan 13 '14 23:01

Jiac


1 Answers

Realize this is a little late, but Tsay's MTS package can help.

data <- cbind(x1,x2,x3,x4)

mod <- VARMA(data)

If you want some help picking p and q:

Eccm(data)

This returns p-values for model type. See http://faculty.chicagobooth.edu/ruey.tsay/teaching/mtsbk/ for more details

like image 188
user5957401 Avatar answered Sep 28 '22 16:09

user5957401