On the plot black is the data and red are the fitted values obtained from fitted i.e. one step forecast, I am using 365 days for training and then 3000+ days for testing, I choose value of k using cross-validation on 365 data points. Following is the model I used:

Arima(data, order=c(2,0,2),xreg=forecast::fourier(min_temp_aus,57))

enter image description here

How can I improve the fit on both extremes?

PS: Square loss is of 17524 considering I am predicting 3000+ data points. The way I am looking at it is, if I am off by 1 with every prediction still it makes a loss of 3000. I thought it is good, but maybe I am wrong.


Eye-balling. The fit does not look too bad. There is a clear seasonal pattern that your model seems to be picking up.

Residuals. What you should always look at are the fit and the forecast residuals: fit residuals, $e_t := y_t - \hat{y}_t$, and forecast residuals, $e_{t+1|t} := y_{t+1} - \hat{y}_{t+1|t}$. ( Where $e_{t+1|t}$ is the prediction residual of the forecast at time $t$ for time $t+1$. )

Some ways of looking at these residuals:

  1. Is there a seasonal pattern in the residuals? If so, find out its period and add this into back into the model through the exogenous Fourier regressors.
  2. Is there remaining auto-correlation in the residuals? Yes: add AR or MA terms, or change model along different avenues. No: you're good.
  3. Look at histogram of residuals: do they look normal? Is their mean equal to zero? If yes: you're fine. If no: continue modelling.

Without more info, that's all I can tell you.

p.s. Unfortunately the words error and residual are often used loosely and interchangeably. Idem: prediction and forecast. Residuals are observed and are estimates of error, a random variable. Forecast always refers to a prediction into the future.

p.p.s. It is good practice to report the Mean Squared Prediction Error [MSPE] instead of the Sum of Squared (Prediction) Residuals [SSR].

  • 1
    $\begingroup$ can you help me with a question on Fourier transformation ? stats.stackexchange.com/questions/220119/… $\endgroup$ – user98374 Sep 15 '16 at 5:32
  • 1
    $\begingroup$ I think this is a different question. Can you please look into my question? $\endgroup$ – user98374 Sep 18 '16 at 3:25

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.