问题
I have one sample data
Sno period year_quarter country city sales_revenue 1 1/1/2009 2009-Q1 Argentina Buenos Aires 3008 2 1/4/2009 2009-Q2 Argentina Buenos Aires 3244 3 1/7/2009 2009-Q3 Argentina Buenos Aires 8000 4 1/10/2009 2009-Q4 Argentina Buenos Aires 8719 5 1/1/2010 2010-Q1 Argentina Buenos Aires 3008 6 1/4/2010 2010-Q2 Argentina Buenos Aires 3244 7 1/7/2010 2010-Q3 Argentina Buenos Aires 78 8 1/10/2010 2010-Q4 Argentina Buenos Aires 7379 9 1/1/2011 2011-Q1 Argentina Buenos Aires 3735 10 1/4/2011 2011-Q2 Argentina Buenos Aires 7339 11 1/7/2011 2011-Q3 Argentina Buenos Aires 17240 12 1/10/2011 2011-Q4 Argentina Buenos Aires 20465 13 1/1/2012 2012-Q1 Argentina Buenos Aires 13134 14 1/4/2012 2012-Q2 Argentina Buenos Aires 15039
I forecasted the three quarter i.e 2012 q3, 2012 q4 and 2013 q1 with the help of the ETS(A,N,N).Code for the prediction is as below
retail_data.xts<-xts(retail_data$sales_revenue, retail_data$period);
retail_data.ts <- as.ts(retail_data.xts);
retail_data.ets <- ets(retail_data.ts,model="ANN");
retail_data.fore <- forecast(retail_data.ets, h=4);
plot(retail_data.fore);
the outcome of the calculation is
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95 15 14905.37 8925.968 20884.78 5760.6608 24050.09 16 14905.37 7202.071 22608.68 3124.1881 26686.56 17 14905.37 5798.868 24011.88 978.1739 28832.58 18 14905.37 4584.713 25226.04 -878.7150 30689.46
All the forecast values are the same.
Is it due to the small dataset or my approach is not good?
Need advice.
回答1:
By using model = "ANN"
you are fitting a simple exponential smoothing model with additive errors (A). See help(ets)
for possible models or leave the model argument out for automatic model selection. Your model includes no trend and no seasonality (NN).
Mathematical details on the possible models are given in A state space framework for automatic forecasting using exponential smoothing methods as stated on the help page for ets
. As explained on pages 441 and 442, the series level l_t is a linear function of the original time series Y_t. In a model without trend and seasonality (e.g. ANN) the forecasts F_{t+h} are not dependent on h, F_{t+h} = l_t. This is why the forecasts in the above example are the same for all horizons, only the confidence intervals widen with increasing h.
I guess a discussion on which model is appropriate would be OT here, but I think your approach using exponential smoothing is reasonable given the short time series.
回答2:
Also, what I found is that if you have time series with smaller number of values, then you will get the same forecasts. I guess this is due to the fact that the model is unable to derive seasonality or trend components from the available time series. But when I included more past data, I got better forecasts.
来源:https://stackoverflow.com/questions/27293303/forecasting-values-are-coming-same-in-r