I have some models built with the auto.arima function from the forecast package. I'm modeling a variable called 'natural efluent energy' (ena), which is how much energy you can extract from some Hydrography region. There are 2 regressor variables (rainfall precipitation from period $t$ and $t-1$.)

Each region has it's own model - some series show positive trend, some shows negative trend, and some seems stationary. The problem is that some forecasts 'from auto.arima' are giving values higher/lower than usual (some forecasts give me negative values, which are not possible).

My original call is below:

 m1 = auto.arima(serie, xreg = regvars)

For the data on the link, I changed it to

 m1 = auto.arima(serie, xreg = regvars, max.P = 0, max.Q = 0, stationary = TRUE)

Then I get good forecasts in this case. My question is, what these parameters(max.P, max.Q) actually control, and how they relate to the trend show by my model variable?

Here is a link for the historic data: http://www.datafilehost.com/download-7718b3fc.html

And here a link for the forecast regressors: http://www.datafilehost.com/download-ca44dfa4.html

And here a link of mean historic values, the forecast must fall between these values: http://www.datafilehost.com/download-e1e265b7.html

My data starts at 2001/Jun, so the serie is:

  y = ts(dframe$ena, freq = 12, start = c(2001, 6))
  • $\begingroup$ If there is a positive trend in your time-series and the “auto.arima” function captured the trend, perhaps by first-differencing and including a mean or a drift term in the model, one would expect forecasts to be larger than historic data. $\endgroup$
    – RioRaider
    Aug 7, 2012 at 17:21
  • $\begingroup$ I've added max.p = 1, max.q = 1, max.P = 0 and max.Q = 0. It reduces a bit, but still high. $\endgroup$
    – Fernando
    Aug 7, 2012 at 17:26
  • 1
    $\begingroup$ I agree with RioRaider. How do you know that the forecasts should not be higher than historical values? An automatic ARIMA model builder will use first or second differences to handle linear or quesdratic trends respectively. If there are historical trends it would be appropriate to project them into the future unless you have external knowledge about the process that indicates something to the contrary. $\endgroup$ Aug 7, 2012 at 17:30
  • 1
    $\begingroup$ @Fernando Instead of playing with the input parameters to try to reduce the forecast why not look at the fitted model to get an idea of why it is trending up. Does an uptrend show in the historical data? Did the model include a first or second difference operation? $\endgroup$ Aug 7, 2012 at 17:33
  • $\begingroup$ Thanks for the feedback. I'm actually new to time series/forecasting. My model says ARIMA(2,1,0)(2,0,1)[12], and yes there is a small positive trend. A simple linear regression gives me more reasonable forecasts...is there some way to tweak the ARIMA model, to avoid these high-values? $\endgroup$
    – Fernando
    Aug 7, 2012 at 20:41

1 Answer 1


If a series is growing then the forecasts will exceed the history. In all probability the model you are using is perhaps inappropriate as outliers/inliers, level/step shifts , seasonal pulses and or local time trends may be present. I don't believe these are accounted for in the automatic model identification process but I could be wrong and their omission can easily thwart ARIMA model identification and consequently forecasting. Furthermore changes in parameters or changes in variance over time are not accounted for and can have negative effects on parameter estimation and subsequently forecasting.


There are 134 observations on an output series and two user specified supporting series and the user wishes a 12 period out forecast using user-specified future values for these two inputs enter link description here . The data started at 2001/6 . A graph of the output series suggests some clear outliers/pulses. enter image description here Notice a very small value at period 126 (11/2011). The ARIMA model that was automatically developed for the output series (taking into account the effect of the two X's AND the effect of Pulses and Seasonal Pulses ) was (1,0,0)(1,0,0) enter image description here. Note that if one doesn't or didn't take into account both of these possibly needed components the automatic arima simply may not be useful. Automatic arima that assumes no Pulses, no Level Shifts, no Seasonal Pulses and no Local Time Trends and subsequently develops very poor model suggestions ( as in your case ! ) . The actual/fit/forecast graph yields very good fitted values and very reasonable forecasts. enter image description here A comparison of the actual and cleansed values further clarifies the need for anomaly detection. enter image description here. The forecasts for the next 12 period is quite reasonable. enter image description here I believe that the prime culprit in your bad forecasts is the naivety in believing rather than challenging observations. Accountants believe the observed data while statisticians challenge the data for homogeneity/consistency. The spurious values in your output series ( unaccounted for by the two X's AND/OR the auto-correlative structure within the data led to a bad ARIMA model identification and subsequently bad forecasts premised on using the actual data. The anomaly at 11/2011 leads directly to a bad forecast as the observation at 11/2011 is not part of the normal process and needs to be investigated. It is important to investigate the possible causes for the anomalies to suggest "newly found/discovered cause variables BUT at a minimum unusual values need to be neutralized so that other parameters are robustly estimated . AUTOBOX ( as a default ) uses the adjusted value for 11/2011 and other anomalies in the early part of 2012 as the basis for the forecasts. This assumption is easily reversible via a user-selected menu option which would then use the actual rather than the adjusted value . The spurious high forecasts are probably based on the unusually high (untreated !) values in the early part of 2012 (Jan and Feb ). Hope this helps !

  • $\begingroup$ Also even if the trend slope is small the forecast is 12 periods in advance which would make the increase a lot larger than for a one step ahead forecast. The increase could be correct. The problems IrishStat outlines are possible but not necessarily the case. What is the specific model that you are using? If a first difference is involved that would explain a lot. $\endgroup$ Aug 7, 2012 at 21:22
  • $\begingroup$ @Michael, agreed the issues (the small print/assumptions ) that I mentioned are not necessarily present in real world data BUT I haven't found that case yet. Box and Jenkins in their early work simulated data (free of the issues I mentioned ) and then generalized an approach that would work if those conditions were present. The problem is that some analysts/software think in general that their approach works for data that may not be so simple and that's the rub. $\endgroup$
    – IrishStat
    Aug 7, 2012 at 22:15
  • $\begingroup$ First, thank everyone for the feedback. I'm modeling weather-related data (affluent natural energy). Some series(regions) shows a small positive trend, some not. As a example, i got this model: ARIMA(2,1,0)(2,0,1)[12]-there are 2 regressor variables. How can i tweak the model, in order to get smoother forecasts? thanks $\endgroup$
    – Fernando
    Aug 8, 2012 at 12:22
  • $\begingroup$ @Fernando Your model seems very very complicated and probably the cause of your problem. If you wish to post the data from one of your time series and the auto results , I will try and help you. $\endgroup$
    – IrishStat
    Aug 8, 2012 at 12:42
  • $\begingroup$ Thanks and sorry for the delay. I've edited the question with data. The main issue is to relate the 'trend' component of my data with the parameters from auto.arima, so i can fit a better model. Thanks again! $\endgroup$
    – Fernando
    Aug 10, 2012 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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