Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Bell Curve of Predicted Values


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Bell Curve of Predicted Values
Date   Mon, 17 Apr 2006 09:48:04 -0500

Perhaps something like this:

clear
sysuse auto
estsimp regress price mpg fore, sims(100000)
setx mpg 12 fore 1
simqi, ev genev(expected_price)
histogram expected, norm


This uses programs from Michael Tomz, Jason Wittenberg, and Gary King's
clarify.

Scott
 
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Randall
> Sent: Monday, April 17, 2006 9:16 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: Bell Curve of Predicted Values
> 
> Maarten, thanks.  This seems very close to what I
> would like to do.  I had been calculating my predicted
> values using matrix language, just because I had
> particular x-values I was interested in obtaining a
> prediction for.  Using your example, I did something
> like this:
> 
> reg price mpg foreign
> matrix yhat=_b[_cons] + _b[mpg]*12 + _b[foreign]*1
> matrix list yhat
> 
> So in essence, I wanted a prediction for mpg=12,
> foreign=1.
> 
> So my question is this:  is there a way of generating
> a distribution based on particular criteria (i.e.
> mpg=12, foreign=1)?
> 
> Thanks again,
> Randall
> 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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