The standard error of prediction in simple linear regression is $\hat\sigma\sqrt{1/n+(x_j-\bar{x})^2/\Sigma{(x_i-\bar{x})^2}}$.

My question is to calculate the standard error of prediction for $pop=1029$ just based on the following regression output. I can get all except $\bar{x}$. And I also know how to calculate the approximate standard error of prediction based on the standard errors of intercept and coefficient of $pop$, ignoring their correlation.

Stata regression output

  • 1
    $\begingroup$ How would the regression output change if you were, say, to add $10^6$ to each pop value and add $-0.0116584\times 10^6$ to each fuel value? Intuitively, that shifts the data far from pop=1029 without altering the regression line and therefore should result in a much wider prediction interval. That means you can focus your research on those elements of the output that change. (Even if you don't have the actual data you can make some up and run both regressions to see what happens.) $\endgroup$ – whuber Jul 11 '13 at 19:32
  • 1
    $\begingroup$ Thanks very much! Only the standard error of the intercept (therefore t, p-value and CI) changes. This inspired me to figure out that $Var(\hat{\beta}_0)=\sigma^2(1/n+\bar{x}^2/SXX)$, then I can get $\bar{x}$ to calculate the standard error of prediction. $\endgroup$ – Randel Jul 11 '13 at 20:39
  • $\begingroup$ The standard error of a predicted value isn't what you said. What you have there is the standard error for the mean at a given $x$. $\endgroup$ – Glen_b Jul 12 '13 at 2:41
  • $\begingroup$ Sorry I just followed the description of the option stdp in Stata. It can be thought of as the standard error of the predicted expected value, mean or the fitted value. $\endgroup$ – Randel Jul 12 '13 at 13:22

The question is to calculate the following statistic from the above regression output:


The answer is inspired by @whuber:

  • get $\hat\sigma$ from $\hat\sigma^2=SS_{Residual}/(n-p-1)$, where $p=1$;
  • $n$ and $x_j$ are known;
  • obtain $\bar{x}$ from $\hat{Var}(β_{cons})=\hatσ^2(1/n+\bar{x}^2/\Sigma{(x_i-\bar{x})^2})$;
  • $\Sigma{(x_i-\bar{x})^2}=SS_{Model}/\hat{\beta}_{pop}^2$.
| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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