I have a data frame where one column represents my daily observed values and a date column formatted "2014-10-01" using the as.Dates function.
I'm creating an xts object doing the following:
xtsObject <- as.xts(vector$values, order.by = vector$dates)
I then pass the xtsObject into the ets forecast function and call predict on the resulting object to predict the next three time steps like so:
fit <- ets(xtsObject)
pred <- predict(fit,3)
The results look like:
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
366 0 0 0 0 0
367 0 0 0 0 0
368 0 0 0 0 0
(vector passed in consisted of all zeros, so the predict is working as expected)
My question is there anyway to associate these three future forecasted points with the appropriate date? My data is daily and so instead of "366", "367", "368" it would be preferable to see "10-01-2015", "10-02-2015", "10-03-2015" to know these are the dates to which these forecasted points belong to. I've tried zoo, xts, and ts and all produce similar output. Thoughts?