I have a yearly time series data, from 1980 to 2005. The data is splitted into an training sample and a out of sample; the out-of sample consists of the 6 most recent observations and the rest is considered for training sample. I need to fit a ETS model and compare different accuracy measures for different forecast step aheads h=1,2,3,4,5 and 6.
Something like this:
h=1 h=2 h=3 h=4 h=5 h=6 ...
MSE .. .. .. .. .. .. ...
MASE .. .. .. .. .. .. ...
The following code gives me the accuracy measures for h=6:
trainx<- window(x,end=1999.99)
testx<- window(x,start=2000)
fit<- ets(trainx)
accuracy(forecast(fit,h=6),testx)
The questions are:
How can I calculate the accuracy measures for h=1,2,3,4,5 ? For instance, when h=2, I fit a model to training data and I produce the forecast that correspond to 2000 and 2001.
Now, how should I produce the forecast for 2002 and 2003, etc?
Should I suppose that the observations for the year 2000 an 2001 are known and then fit a new model (this time I need to add the observations of 2000 and 2001 to the training set), then, to produce the forecast for 2002 and 2003?