Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: plot predicted effects after regression


From   yumin sheng <[email protected]>
To   [email protected]
Subject   Re: st: plot predicted effects after regression
Date   Sat, 8 May 2004 07:01:52 -0700 (PDT)

Dear Tom,

  Thanks so much. Your solution is great, but if I
remember correctly, I think Stata has a ready and very
simple command for post-estimation graphing of the
predicted effects. I will try to look further myself.
Thanks so much again.

Best wishes,
yumin

--- Thomas Trikalinos <[email protected]> wrote:
> So you need predicted values on the
> VariableOfInterest adjusting at the 
> mean level of continuous covariates, and the
> reference category of 
> categoric covariates.
> 
> A simple but not so elegant  solution is
> 
> . gen PredY = Constant + beta1* VariableOfInterest1
> + 
> beta2*MeanContinuousCovariate2   (or the
> corresponding analogue for a 
> logit/probit/poisson etc regression)
> 
> [first run . egen MeanContinuousCovariate2 =
> mean(ContinuousCovariate2)]
> 
> 
> 
> Constant and beta1, beta2 are from the regression
> output. All 
> Categorical covariate terms are zero (this would be
> your reference 
> category, right?) and all the continuous covariate
> terms are 
> incorporated using their mean level. This way you
> adjust for the 
> reference category for categoric covariates and for
> the mean value of 
> continuous covariates.
> 
> You most probably have more than one continuous
> covariates; just put in 
> as many terms as you need. If you have different
> functions of the 
> VariableOfInterest (eg quadratic or cubic terms) put
> them in as more 
> VariablesOfInterest.
> 
> This is a crude workaround I use. I'm confident that
> people know 
> something better and more elegant, though...
> 
> Cheers
>   Tom
> 
> 
> On May 8, 2004, at 1:37, yumin sheng wrote:
> 
> > Dear all,
> >
> >   This is a real simple question, but I just
> couldn't
> > remember the command off the top of my head. Can
> > anyone tell me how to plot the predicted effects
> of a
> > variable after running the regressions, while
> holding
> > all the other independent variables constant.
> Thanks a
> > bundle!
> >
> > Best,
> > yumin
> >
> >
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > Win a $20,000 Career Makeover at Yahoo! HotJobs
> >
> http://hotjobs.sweepstakes.yahoo.com/careermakeover
> > *
> > *   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/
> >
> 
> *
> *   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!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 
*
*   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