# Arima model giving high forecast values

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))

• 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. – RioRaider Aug 7 '12 at 17:21
• I've added max.p = 1, max.q = 1, max.P = 0 and max.Q = 0. It reduces a bit, but still high. – Fernando Aug 7 '12 at 17:26
• 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. – Michael R. Chernick Aug 7 '12 at 17:30
• @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? – Michael R. Chernick Aug 7 '12 at 17:33
• 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? – Fernando Aug 7 '12 at 20:41

## 1 Answer

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.

AFTER RECEIPT OF DATA:

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. 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) . 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. A comparison of the actual and cleansed values further clarifies the need for anomaly detection. . The forecasts for the next 12 period is quite reasonable. 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 !

• 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. – Michael R. Chernick Aug 7 '12 at 21:22
• @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. – IrishStat Aug 7 '12 at 22:15
• 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 – Fernando Aug 8 '12 at 12:22
• @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. – IrishStat Aug 8 '12 at 12:42
• 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! – Fernando Aug 10 '12 at 12:51