Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

The upper and lower prediction intervals for the forecast periods are provided by the forecast() function. However, neither prediction or confidence intervals seem to be available for the fitted values within the range of the actual data. Why is this?

share|improve this question

1 Answer 1

The fitted values are one-step forecasts, so prediction intervals can be obtained by adding/subtracting a suitable multiple of the standard deviation of the residuals. E.g., assuming normal errors, an approximate 95% prediction interval is given by $\hat{y}_t\pm 1.96\hat{\sigma}$ where $\hat\sigma^2$ is the variance of the residuals.

Presumably you mean a confidence interval for the mean of the one-step forecast distributions. I'm not sure why you would want such a thing but you could obtain it by reformulating the model in state space form and using a Kalman filter.

You ask why the forecast() function does not provide these. Simply, because they are hardly ever useful.

share|improve this answer
    
Yes, it makes sense that you really only care about the precision of your forecast. I am accustomed to the intervals returned by predict.lm. Thanks for taking time to explain. –  Scott Jan 3 '12 at 19:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.