2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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.) $\endgroup$ – Richard Hardy Nov 10 '15 at 19:35
  • $\begingroup$ Thanks. Edited. Please let me know if it's not clear. $\endgroup$ – Hamid R. Darabi Nov 10 '15 at 20:04
  • $\begingroup$ 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? $\endgroup$ – Richard Hardy Nov 10 '15 at 20:14
  • $\begingroup$ I don't see a package called "VAR" on CRAN. Could it actually be "vars"? $\endgroup$ – Richard Hardy Nov 11 '15 at 16:39
  • $\begingroup$ Thanks Richard. That's correct, the package name is vars. Edited in the question as well. $\endgroup$ – Hamid R. Darabi Nov 11 '15 at 19:00
1
$\begingroup$

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))
$\endgroup$
1
$\begingroup$

You could add them as exogenous variable, or you can decompose the time series and analyze the seasonal component around Christmas. Maybe, even consider adding a dummy fixed effect for around the time you see seasonality.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.