[R] Dummy variable in ARIMA

Mikael Olai Milhøj mikaelmilhoj at gmail.com
Thu Feb 26 17:02:48 CET 2015


Hi all

I have been searching on the web in vain. I want to include a dummy
variable in my ARIMA model. Let's say that I want to make an AR(1) model
for X including a dummy variable which should be 1 for observation 4,5,6
and zero otherwise (let's say that there is 50 observations in total). How
do I make that?

This does the trick but seems inefficient: dummy<-c(rep(0,3), rep(1,3),
rep(0,44))

Thx in advance

Best regards
/Mikael

	[[alternative HTML version deleted]]



More information about the R-help mailing list