I have a some data set on which I fit a linear regression model using the lm function in R. I can also visually obtain the prediction Interval around that regression line using predict. My question is how is that prediction interval line computed?? Can I obtain the equation of that line in R?

  • $\begingroup$ Note that the ${S^2}_{error}$ can be found as the 'residual standard error' in the regression output in $R$. $\endgroup$ – Vishal Apr 8 '16 at 17:42
  • $\begingroup$ What does that value represents? From that those values, can we derived the equation of both the upper and lower bounds? $\endgroup$ – user3841581 Apr 8 '16 at 17:53
  • $\begingroup$ I am actually looking not for the equation of a single point prediction interval, but the equation for that whole curve. Is there a way to obtain the equation of that curve? $\endgroup$ – user3841581 Apr 8 '16 at 18:36
  • $\begingroup$ Hmm, that's a good question. I don't think there's an equation for the entire curve. Prediction Interval would have to be calculated for each point (observation), and then all values can be combined together to construct the curves. $\endgroup$ – Vishal Apr 8 '16 at 19:41
  • $\begingroup$ @Vishal, so there is not method to actually approximate that curve? $\endgroup$ – user3841581 Apr 25 '16 at 13:22