Hi I am making an arima() model with x = price with hourly data from 2000-2018. I have grouped by year and now have other regressors (3 of them) which I have used as xreg in arima().
I am new to dummy variables and not exactly sure how they work, meaning I am wanting to use a dummy variable for before 2014 and after 2014. I am not sure if I need just one variable for this or if I need one variable for every year of the data?
So as of now, I have used the function dummy_cols() and set select_comuns = c("Year") which now returned variables from 2000 -2018 with Year_ before it. When I include these in with x_reg I get an error of "non-finite value supplied by optim".
Is there a way to make one dummy variable for values before 2014 and after 2014?
Thank You in advance!