[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
stata user <sf.stata.user@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: calculating the confidence intervals for the difference in predicted values |

Date |
Mon, 19 Oct 2009 00:19:27 -0700 |

Dear Statalist: I have a question on how to calculate confidence intervals for the difference between two predicted values. Say I have a liner regression model: Y=a+bX+e, and I obtained an estimate of the coefficients a_bar and b_bar (where b_bar can be a matrix of coefficents). Then I used the model to make one in-sample prediction Y_in and one out-of-sample prediction Y_out, and I want to calculate the standard error of the difference btw the two predicted values, i.e., Var(Y_in-Y_out). I think I can rewrite the difference as Y_in-Y_out=b_bar*(X_in-X_out), and then Var(Y_in-Y_out)=(X_in-X_out)*e(V)*(X_in-X_out)'. But I have no idea how to implement it in Stata. Also, what if I want to find Var(Y_in/Y_out)?--i.e. now we want to estimate the variance of a nonlinear function of the two predicted values. Can anyone help? Any suggestions would be appreciated! Thanks! Ken. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: calculating the confidence intervals for the difference in predicted values***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**Re: st: scatter line and reshape question** - Next by Date:
**Re: st: calculating the confidence intervals for the difference in predicted values** - Previous by thread:
**st: endogeneity and overidentification results differ clustered standard errors are used with -ivregress 2SLS- vs -ivreg 2SLS-** - Next by thread:
**Re: st: calculating the confidence intervals for the difference in predicted values** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |