I have four different time series of hourly measurements:
- The heat consumption inside a house
- The temperature outside the house
- The solar radiation
- The wind speed
I want to be able to predict the heat consumption inside the house. There is a clear seasonal trend, both on a yearly basis, and on a daily basis. Since there is a clear correlation between the different series, I want to fit them using an ARIMAX-model. This can be done in R, using the function arimax from the package TSA.
I tried to read the documentation on this function, and to read up on transfer functions, but so far, my code:
regParams = ts.union(ts(dayy)) transferParams = ts.union(ts(temp)) model10 = arimax(heat,order=c(2,1,1),seasonal=list(order=c(0,1,1),period=24),xreg=regParams,xtransf=transferParams,transfer=list(c(1,1)) pred10 = predict(model10, newxreg=regParams)
where the black line is the actual measured data, and the green line is my fitted model in comparison. Not only is it not a good model, but clearly something is wrong.
I will admit that my knowledge of ARIMAX-models and transfer functions is limited. In the function arimax(), (as far as I have understood), xtransf is the exogenous time series which I want to use (using transfer functions) to predict my main time series. But what is the difference between xreg and xtransf really?
More generally, what have I done wrong? I would like to be able to get a better fit than the one achieved from lm(heat ~ temp*radi*wind*time).
Edits: Based on some of the comments, I removed transfer, and added xreg instead:
regParams = ts.union(ts(dayy), ts(temp), ts(time)) model10 = arimax(heat,order=c(2,1,1),seasonal=list(order=c(0,1,1),period=24),xreg=regParams)
where dayy is the "number day of the year", and time is the hour of the day. Temp is again the temperature outside. This gives me the following result:
which is better, but not nearly what I expected to see.