I'm trying to make a plot of the uncertainty interval of in-sample prediction
library("stats") Y_obs <- read.table("series.txt") arma <- arima(Y_obs, order = c(2,0,1)) Y_in_sample <- Y$V1 - arma$residuals
If I want to show some sort of interval of the uncertainty, so I could write
std <- sd(Y_in_sample) int <- c(Y_in_sample - 1.96*std, Y_in_sample - 1.96*std)
but does this would be the confidence interval for the mean, and not really a prediction interval, so I'm not sure if this makes sense. Is there a natural way of making such an uncertainty interval for in-sample prediction? And would this interval be a confidence interval or a prediction interval?
(It seems some literature does not distinguish between the two, so in case there is no distinction between the two in this case, I'd want to know.)