1
$\begingroup$

This is my first message on CrossValidated to get some insights on an issue I am facing while trying to model properly a time series. I am relatively new to this science so please brace with me.

My time series is related to energy consumption with a daily seasonality (96 values per day). Here a description:

enter image description here

enter image description here

For the model definition, I used an auto.arima as a start but the model returned (SARIMA (1,0,0)(0,1,0)[96]) has residuals that are not white noise, this means that the stochastic part of my series is not entirely modeled. Below a summary of residuals checking:

enter image description here

Ljung-Box test

data:  Residuals from ARIMA(5,1,1)(0,1,1)[96]
Q* = 248.44, df = 185, p-value = 0.001282

Model df: 7.   Total lags used: 192 

I tried to create my own model using differentiation but still end up with residuals that are not white noise which is frustrating. I differentiated twice to remove seasonal and trend patterns, this is what I obtained :

After first differentiation: enter image description here

After second differentiation:

enter image description here

I chose a SARIMA(0,1,4)(0,1,1)[96] because:

  • we can see a very significant spike on lag 96 on acf with an exponential decay on pacf seasonal lags which suggests a seasonal MA1.

  • And we observe another significant spike on lag 4 on acf for which I chose a non-seasonal MA4.

At the end, I obtained these residuals:

enter image description here

Do you think it is reasonable to choose such models in regard to the significance of residuals correlations ? Do you have any advice on how should I carry on from here ?

Thank you in advance for your help ?

$\endgroup$
1
  • $\begingroup$ your remainders don't look like random series at all. your trend-seasonal decomposition is not working very well $\endgroup$
    – Aksakal
    Apr 27 at 20:23
0
$\begingroup$

Well, 96 values per day means you have data every 15 minutes. I think the best first step would be to aggregate to hourly if you can, then you would have a pretty standard hourly seasonal shape. Then you would still have multiple seasonal patterns to worry about but it would be much simpler IMO. You would have 24 for the daily pattern then potentially 24 * 7 to account for a weekly pattern.

With that said, if you have patterns in your residuals that just means you are not accounting for those patterns in your model. Now should we change our order to pick up this signal in our residuals? No, I would fit to produce the best forecasts on validation sets, which is our ultimate goal anyway. If the residuals contain real signal then that would mean a different order could produce better forecasts, and if it is just noise then the new order would produce worse forecasts. There are tons of statistical tests for white noise and all that but the best test for us is to just test the forecast.

If you are new to time series then I always recommend more plug and play models like fbprophet. It also handles multiple seasonality quite well which seems like your biggest driver.

$\endgroup$
7
  • $\begingroup$ Why would 24 work better than 96? What's magic about that? $\endgroup$
    – whuber
    Apr 27 at 20:23
  • $\begingroup$ @Whuber Hourly datetime handling comes pre-built in a lot of packages. And we would aggregate up a level so we definitely wouldn't have to worry about accounting for the 4 data points in each hour if there is some seasonality there. Just seems like a simpler problem and not a large loss of useful signal. $\endgroup$
    – Tylerr
    Apr 27 at 20:30
  • $\begingroup$ Thank you for the explanation: this reasoning wasn't apparent in your answer. $\endgroup$
    – whuber
    Apr 27 at 20:46
  • $\begingroup$ Thank you Tyler for your comment quite insightful, I'll try this fbprophet library. Just to clarify few points: when you say aggregate to hourly, you mean averaging over an hour correct ? If a model residuals are not white noise but the forecasting is of good quality, we can accept the model as is ? $\endgroup$
    – meliac
    Apr 27 at 21:09
  • $\begingroup$ I would sum up to the hourly. I think the key here is that for a lot of time series forecasting your in sample fit is not a great indicator for out of sample prediction power. A model which has residuals that are more white noise than another can generate horrible predictions. You can overfit and get perfectly random error with useless predictions. If you iterate through several orders or several different models forecasting and the model which performs best on time series cross validation does not have random noise for residuals would you use a model that performs worse? Probably not. $\endgroup$
    – Tylerr
    Apr 28 at 0:38

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.