Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: RE: RE: graphing predicted effects

 From Sunil Kumar To statalist@hsphsun2.harvard.edu Subject st: RE: RE: graphing predicted effects Date Fri, 25 Nov 2011 16:13:12 +0000

```With Stata 11 you can achieve most of what marginsplot would have done
for you, but you have to do several steps manually. The link
http://www.ats.ucla.edu/stat/stata/faq/mar_graph/margins_graph.htm
explains these steps very well.

Regarding binary or categorical variables, it usually doesn't make
sense to calculate means because these don't have a clear
interpretation. Instead, identify a set of population which is of
interest by setting categorical variables equal to some level, and
then calculate the marginal effect of the variable of interest, and
graph this. Alternatively, calculate a different marginal effect for
each level of the categorical variable, and then graph these together,
overlaying separate lines, to emphasize the difference in marginal
effects depending on category.

On Fri, Nov 25, 2011 at 3:33 PM, Hoffman, George <ghoffman@mcw.edu> wrote:
> predxcat
> http://ideas.repec.org/c/boc/bocode/s402601.html
>
> predxcon
> http://ideas.repec.org/c/boc/bocode/s402602.html
>
> http://ideas.repec.org/p/boc/asug05/11.html
>
>
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of L.M.A. Mulotte
> Sent: Friday, November 25, 2011 9:16 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: RE: graphing predicted effects
>
> Thanks Maarten,
>
> Unfortunately, I do not have Stata 12. Are there any means to graph such effect with Stata 11? I mean, when some of the controls are categorical variables?
>
>
> Louis
>
> --------------------------------------------------------------------------------
>
> From   Maarten Buis <maartenlbuis@gmail.com>
> To   statalist@hsphsun2.harvard.edu
> Subject   Re: st: graphing predicted effects
> Date   Fri, 25 Nov 2011 13:54:00 +0100
>
> --------------------------------------------------------------------------------
>
> I gave that advise before I had access to Stata 12. Now I would advise to use -marginsplot- for categorical variables I would look at the contrast operator -g.- and -gw.-. I haven't had time to play with it yet, but these look very promising.
>
> Hope this helps,
> Maarten
>
>
>
> -----Original Message-----
> From: L.M.A. Mulotte
> Sent: Friday, November 25, 2011 11:04 AM
> To: 'statalist@hsphsun2.harvard.edu'
> Subject: graphing predicted effects
>
> Dear all,
>
> On post http://www.stata.com/statalist/archive/2011-07/msg00121.html, Maarten Buis suggested a way to graph predicted effects for different samples on the same graph.
>
> He suggested to fix remaining variables at their mean value. I have two questions.
>
> 1)      Is there any command that computes these means automatically when we have variety of control variables
> 2)      Can we still compute the mean when we have categorical variables as controls, for example race in the following example
>
> use http://www.stata-press.com/data/r11/nlswork, clear reg ln_wage  i.south i.south#(c.age##c.age c.grade c.birth_yr i.race)
>
>
> Best,
> Louis
>
> *****************************************************************************
> Louis Mulotte
> Assistant Professor
> Organization and Strategy
>
> Tilburg University
> School of Economics and Management
> PO Box 90153 - 5000 LE - Tilburg - The Netherlands Room K1123 / Email: l.mulotte@tilburguniversity.edu / Phone: +31 13 466 8706
> *****************************************************************************
>
>
> *
> *   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/
>
> *
> *   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/
>

*
*   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/
```