# Building VAR (Vector Autoregression) model with dummy variables in R

I came across vars package in [R] and it seems the package does everything I need for a VAR model. The only exception is that I need to define dummy variables. For example think that my dependent vector has n elements and I need to estimate (eliminate) the impact of Christmas holiday on the first element. I define a dummy variable with 1 at Christmas day and 0 at other days, but if I add this into the dependent variables vector, model parameters become extensively large. Is there any other way to define dummies for one variable in this pacakge?

Thanks

• Could you be more specific? Could you explain in more detail what you mean by I require to define dummy variables for one element of the vector? (I suggest editing the original post rather than posting a comment in response.) – Richard Hardy Nov 10 '15 at 19:35
• Thanks. Edited. Please let me know if it's not clear. – Hamid R. Darabi Nov 10 '15 at 20:04
• So it looks that the functionality of the "vars" package is fine, and the problem is actually in your particular application where you do not find the estimation results convincing; is that right? – Richard Hardy Nov 10 '15 at 20:14
• I don't see a package called "VAR" on CRAN. Could it actually be "vars"? – Richard Hardy Nov 11 '15 at 16:39
• Thanks Richard. That's correct, the package name is vars. Edited in the question as well. – Hamid R. Darabi Nov 11 '15 at 19:00

You can include those dummies as exogeneous (exogen) variables:
varfit <- vars::VAR(varmat, p = 2
, exogen = cbind(black.friday = data$black.friday, cyber.monday = data$cyber.monday))