i want to use an ARIMA model in R for predicting an electrical load on a minutely basis. By examining the ACF I figured out which model could suit. The ACF has shown that the value one day ahead has a periodic autocorrelation. Therefore I'd like to implement a seasonal difference with a lag of 1440 (min/day).
Thus, I found this page (http://robjhyndman.com/hyndsight/longseasonality/) describing how to deal with long seasonal periods in R.
However, by applying that method, I experienced the following problem in R:
>Arima(x,order=c(2,0,2),xreg=fourier1(1:length(x),4,1440)) Error in stats::arima(x = x, order = order, seasonal = seasonal, xreg = xreg, : lengths of 'x' and 'xreg' do not match
x is the dataset as a zoo-Object with the following structure (it's just an example, I do not have access to the real structure at the moment; main difference: much more data!):
> str(x) ‘zoo’ series from 2010-01-01 00:00:00 to 2010-01-01 00:06:00 Data: num [1:7] 1 2 3 4 5 6 7 Index: chr [1:7] "2010-01-01 00:00:00" "2010-01-01 00:01:00" ...
Since the number of rows in xreg should be exactly the same as in x, they are apparently not.
Does anyone has any suggestions about or experiecend this?
I'll appreciate any hints!