# Flat ETS forecast of clearly increasing time series

I have a simple time series of one hour intervals:

library('forecast')

# load an hourly time series of points
usage <- ts(scan('http://cl.ly/102L0j3o1p2m0m3p0t2o/usage'), frequency = 24)
plot.ts(usage)


the Holt-Winters forecast looks as expected. plot

usage_forecast_hw <- forecast(HoltWinters(usage), h = 168)

# extremely low p-value - 2.2e-16
Box.test(usage_forecast_hw$residuals, lag = 20, type = 'Ljung-Box') # prediction intervals look as expected. plot(usage_forecast_hw)  but when I try to use ETS to do the forecast, it comes out flat. plot # forecast using ets, it uses M, Md, N for model parameters (i'm not sure what Md is) # AIC = 78323.94 usage_forecast_ets <- forecast(ets(usage), h = 168) # extremely low p-value - 5.551e-16 Box.test(usage_forecast_ets$residuals, lag = 20, type = 'Ljung-Box')

plot(usage_forecast_ets)


any help would be appreciated

-
 I don't know enough about time series analysis & forecasting to try to answer this, but the author of the package, @RobHyndman, is a CV contributor, & has an online forecasting textbook here that may be helpful. (My first guess re 'Md' would be the median, FWIW.) – gung Jun 25 '12 at 15:18

As @gung suggests, please read the help files and associated literature to learn about these models. It is dangerous to use models that you don't understand.

The forecast function is not flat, it is damped. So it levels off relatively quickly. The model chosen is an ETS(M,Md,N) model:

> fit1
ETS(M,Md,N)

Smoothing parameters:
alpha = 0.9999
beta  = 0.6878
phi   = 0.98

Initial states:
l = 314205557227.206
b = 1

sigma:  0

AIC     AICc      BIC
78323.94 78323.97 78351.97


This output should immediately alert you to some problems: the $\alpha$ level is almost one which suggests the model is mis-specified.

If you want a trending forecast, then specify one. e.g.,

fit <- ets(usage, model="AAN", damped=FALSE)


Although the model may not give the best AIC, it may give forecasts that are more useful to you.

Better still, look carefully at the data. The following plot reveals some interesting structure:

plot(diff(usage))


With over 2000 observations, you probably want something more sophisticated than an ETS model.

-
 thanks for taking a look, I really appreciate it. the help shows definitions for N, A and M and I wasn't sure what Md meant. multiplicative with dampening maybe? I will down sample this data set before it's used. thanks again. – patrick d Jun 25 '12 at 21:17

Exponential smoothing would be appropriate if the data tend to drift. Since exponential smoothing is a special case of an ARIMA Model namely IMA(1,1) you probably should look at fitting ARIMA models and find a "best fitting" model. That could turn out to be something different from exponetial smotthing and as Rob suggests you have a long enough series to find out.

-