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?
Asked
Active
Viewed 42 times
0
-
Note that the ${S^2}_{error}$ can be found as the 'residual standard error' in the regression output in $R$. – Vishal Apr 08 '16 at 17:42
-
What does that value represents? From that those values, can we derived the equation of both the upper and lower bounds? – user3841581 Apr 08 '16 at 17:53
-
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? – user3841581 Apr 08 '16 at 18:36
-
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. – Vishal Apr 08 '16 at 19:41
-
@Vishal, so there is not method to actually approximate that curve? – user3841581 Apr 25 '16 at 13:22
-
I don't think so. You'd have to perform calculations for each point -- please read through the answers and comments in the link provided above 'Linear regression prediction interval'. – Vishal Apr 25 '16 at 18:00