Statalist The Stata Listserver


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

Re: st: Bell Curve of Predicted Values


From   Randall <[email protected]>
To   [email protected]
Subject   Re: st: Bell Curve of Predicted Values
Date   Mon, 17 Apr 2006 07:15:50 -0700 (PDT)

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


--- Maarten buis <[email protected]> wrote:

> Randall:
> I this what you are looking for?
> 
> *--------begin example----------
> sysuse auto, clear
> reg price mpg foreign 
> predict yhat, xb
> hist yhat, normal
> *-------end example------------
> 
> HTH,
> Maarten
> 
> --- Randall <[email protected]> wrote:
> > I have a multivariate OLS regression, and I am
> only
> > interested in the predicted value of the outcome
> > (y-hat).  I am also interested in the sensitivity
> of
> > this predicted outcome, and would like to show
> this in
> > a graph, specifically a bell curve.  Does anyone
> know
> > a way to create a graph which can show a bell
> curve of
> > predicted values? (i.e. probability on the y-axis
> and
> > predicted values on the x-axis)
> > 
> > I can get the predicted value, and I can get 95%
> > confidence intervals for predicted values in Stata
> > using the method of Woolridge, 2nd Ed., p. 206. 
> This
> > way calls for adjusting the data and re-running
> the
> > regression so that the constant's 95% confidence
> > intervals are those of the predicted values.  But
> this
> > is merely two more points in the bell curve; I am
> > looking for the entire distribution graphically. 
> 
> 
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
> 
> visiting adress:
> Buitenveldertselaan 3 (Metropolitan), room Z214
> 
> +31 20 5986715
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> 
> 		
>
___________________________________________________________
> 
> 24 FIFA World Cup tickets to be won with Yahoo! Mail
> http://uk.mail.yahoo.com
> *
> *   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/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index