Length of X in in ARX/ARMAX/ARIMAX
Hi,
I want to an ARX1 model where X is an Indicator function which is 1 during weekends and 0 during weekdays. I have daily data starting on a Monday from January 2 until December 31 (364 obs). I created my X as follows:
X = repmat([0 0 0 0 0 1 1]’, 52, 1);
Hence X has also 364 obs. However when I now estimate my model I get an error saying that X must contact at least 365 obs.
I know this has something to do with a X0, however I am not sure what this X0 should be (to be honest I’m not really sure why I need X0). Adding a single 0 or 1 at the beginning of my X does the trick but can someone please tell me whether this should be a 0 or a 1 (even though results are almost the same) and whether my AR1 and X will still be correctly ‘aligned’ after adding a single observation at the beginning of my X. That is, will all ‘1’s be corresponding to weekends and ‘0’s to weekdays.
Thank you!Hi,
I want to an ARX1 model where X is an Indicator function which is 1 during weekends and 0 during weekdays. I have daily data starting on a Monday from January 2 until December 31 (364 obs). I created my X as follows:
X = repmat([0 0 0 0 0 1 1]’, 52, 1);
Hence X has also 364 obs. However when I now estimate my model I get an error saying that X must contact at least 365 obs.
I know this has something to do with a X0, however I am not sure what this X0 should be (to be honest I’m not really sure why I need X0). Adding a single 0 or 1 at the beginning of my X does the trick but can someone please tell me whether this should be a 0 or a 1 (even though results are almost the same) and whether my AR1 and X will still be correctly ‘aligned’ after adding a single observation at the beginning of my X. That is, will all ‘1’s be corresponding to weekends and ‘0’s to weekdays.
Thank you! Hi,
I want to an ARX1 model where X is an Indicator function which is 1 during weekends and 0 during weekdays. I have daily data starting on a Monday from January 2 until December 31 (364 obs). I created my X as follows:
X = repmat([0 0 0 0 0 1 1]’, 52, 1);
Hence X has also 364 obs. However when I now estimate my model I get an error saying that X must contact at least 365 obs.
I know this has something to do with a X0, however I am not sure what this X0 should be (to be honest I’m not really sure why I need X0). Adding a single 0 or 1 at the beginning of my X does the trick but can someone please tell me whether this should be a 0 or a 1 (even though results are almost the same) and whether my AR1 and X will still be correctly ‘aligned’ after adding a single observation at the beginning of my X. That is, will all ‘1’s be corresponding to weekends and ‘0’s to weekdays.
Thank you! armax, arimax, length of vector, exogenous input, exogenous predictor, indicator funcion, weekday, weekends MATLAB Answers — New Questions