문제

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)??

도움이 되었습니까?

해결책

The help page, ?forecast, is very straightforward:

mean Point forecasts as a time series

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top