r - Can I get confidence interval instead of prediction interval using forecast.Arima (package forecast)? -
hi understand differences between confidence interval , prediction interval (see post rob hyndman , discussion on crossvalidated). , prediction interval wider confidence interval.
my question can confidence interval forecast.arima
? why prediction interval rather confidence interval calculated forecast
? in document of forecast:
forecast(object, h=10, level=c(80,95), fan=false, lambda=null, bootstrap=false, npaths=5000, biasadj=false, ...)
level
confidence level prediction intervals.
prediction intervals useful because in forecasting want know uncertainty of future observation.
i can't think why ever need confidence interval future mean, here example showing how compute it:
library(forecast) fit <- auto.arima(wwwusage) fc <- forecast(fit, h=20, level=95) sim <- matrix(na, ncol=20,nrow=1000) for(i in 1:1000) sim[i,] <- simulate(fit,20) se <- apply(sim,2,sd)/sqrt(1000) fc$upper <- fc$mean + 1.96*se fc$lower <- fc$mean - 1.96*se plot(fc)
Comments
Post a Comment