I have a gold price data set with "DATE" and "GOLD PRICE" variables.After doing all the pre processing steps in R,I convert the data frame object to time series by ts or xts function and check for stationary through adf test.
Now by enabling forecast library I run auto.arima function and forecast next ten values.
x <- "DATE" "GOLD PRICE"
01-01-2006 1326
x.xts <- xts(x$GOLD PRICE,X$DATE),
fit <- auto.arima(x.xts)
forecast <- forecast(fit,h=10)
Now when I plot the forecast I get some values plotted in x instead of actual dates.I am able to get the date from x.xts
through index(x.xts)
. But I want to extract it from forecast to get it plotted in graph for better understanding.
Someone please help me through this with the R codes.