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

From |
Thomas Trikalinos (.Mac) <ttrikalin@mac.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: plot predicted effects after regression |

Date |
Sat, 8 May 2004 10:31:49 +0300 |

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/

**Follow-Ups**:**Re: st: plot predicted effects after regression***From:*yumin sheng <shengyumin@yahoo.com>

**References**:**st: plot predicted effects after regression***From:*yumin sheng <shengyumin@yahoo.com>

- Prev by Date:
**Re: st: About log file** - Next by Date:
**st: Re: working within bygroups** - Previous by thread:
**st: plot predicted effects after regression** - Next by thread:
**Re: st: plot predicted effects after regression** - Index(es):

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