1
$\begingroup$

Known data, 4 years of daily energy consumption correlated with temperature, seasonal calendar and holidays.
Required forecasting for next days depending on known variables like temperature and holidays.
My approach is:

trainCD <- read.table("TrainCD.csv", sep=";",dec=",", header = TRUE)

   #(variables :Year;Month;Day;CD;Temperature;Holiday) // CD= Consumption

prevCD<-auto.arima(ts(trainCD$CD,frequency =365),d=1,D=1,xreg=trainCD$Temp)

   #where trainCD$Temp represents history of daily temperatures 

ProgCD <- forecast(prevCD,xreg = temper$Tprog)

   #forecast using future temperatures from external system

The daily forecast is OK, it gives good results; but I would like also to improve it by adding the holiday variable, on the history and on the future variables.
My question is: Can I use something like this?

prevCD7 <- auto.arima(ts(trainCD$CD,frequency=365),d=1,D=1,
             xreg=cbind(trainCD$Temp,trainCD$Holiday))
ProgCD7 <- forecast(prevCD7, xreg=cbind(temper$Tprog,temper$Holiday2))
$\endgroup$
  • 1
    $\begingroup$ See robjhyndman.com/hyndsight/dailydata $\endgroup$ – Rob Hyndman Dec 5 '16 at 21:51
  • $\begingroup$ Holiday effects are quite common both before and after the holiday thus you need to consider the window of response per holiday. Temperature should be converted to heating and cooling degree days to incorporate the "bathtub effect " . Your series may have a number of level shifts and/or a number of time trends , Unusual values need to be identified for you to have robust model where unusual values don't distort model identification or estimated parameters. Non-constant error variance (if any) needs to be identified and remedied either with GLS or appropriate Box-Cox adjustments. $\endgroup$ – IrishStat Dec 5 '16 at 22:14
0
$\begingroup$

Holiday effects are quite common both before and after the holiday thus you need to consider the window of response per holiday. Temperature should be converted to heating and cooling degree days to incorporate the "bathtub effect " . Your series may have a number of level shifts and/or a number of time trends , Unusual values need to be identified for you to have robust model where unusual values don't distort model identification or estimated parameters. Non-constant error variance (if any) needs to be identified and remedied either with GLS or appropriate Box-Cox adjustments.

$\endgroup$
  • $\begingroup$ I understand your arguments and yes the window of response per holiday plus the "lag" of the temperature must be taken into consideration. I try to understand by doing, my knowledge into this is somehow limited because i recently started with r and coding. I obtained some good forecasts in my opinion with average of 4-5% daily errors within 30 days. For sure results can be better but i need to understand and learn how to do it :) . Thanks $\endgroup$ – Mihai Stancu Dec 5 '16 at 22:34
  • $\begingroup$ I am not sure about lag effects of temperature .. my concern is that on cold days you have high consumption ... on hot days you have high consumption AND for "normal days" you have low consumption. By transforming temperature into two variables CDD and HDD you correctly get the response coefficient(s) to temperature. Certain days of the month and even certain weeks of the month can also come into play. $\endgroup$ – IrishStat Dec 5 '16 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.