Question

data_test <- NULL
for(i in 1:ncol(dataset)) {
  col <- ts(dataset[,i])
  fit1 <- auto.arima(col, trace=TRUE))
  fcast <- forecast(fit1,h=12, level=c(90,95))
  data_test <- cbind(data_test, fcast$lower)
}

write.table(data_test, "Forecast.csv", sep=";", dec=",", append=TRUE)

I would like to write the Point forecast instead of the fcast@lower, though when I type names(fcast) in my R-script, I get:

[1] "method" "model" "level" "mean" "lower" "upper" "x" "xname" "fitted" "residuals"

my question: where is the point forecast? and how do I write out the point forecast (and only the point forecast)??

Was it helpful?

Solution

The help page, ?forecast, is very straightforward:

mean Point forecasts as a time series

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top