Bookmark and Share

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: marginsplot is acting differently

From (Jeff Pitblado, StataCorp LP)
Subject   Re: st: marginsplot is acting differently
Date   Tue, 03 Jan 2012 18:02:35 -0600

Richard Williams <> noticed an unintentional
behavior change to -marginsplot- after -margins- with factor variables in the
-dydx()- option (introduced in the 13oct2011 update):

> -marginsplot- seems to be acting differently than it was a few months 
> ago, and the change is not for the better. Here is my code:
> webuse nhanes2f, clear
> logit diabetes i.female age, nolog
> margins, dydx(black female) at(age=(20 30 40 50 60 70)) vsquish
> marginsplot, noci
> When I ran this a few months ago, I got a line for and 
> 1.female, which is what I want. But, when I run it now, I also get 
> lines for and 0b.female. The latter are worthless because 
> they are simply the same as the X axis, i.e. the effects are always 0.
> I am guessing this is some sort of bug and if so I hope it will be 
> fixed soon. But in the meantime, does anybody know an easy way to get 
> only the two lines that I want? I can go into the graph editor and 
> hide things but that is a pain.
> I have a feeling this isn't the best time to ask a question, but I'll 
> keep my fingers crossed that somebody is working late before taking 
> some richly deserved time off for the New Year!

Philip Ryan <> posted a work-around that did not
involve using the graph editor.

We have determined the cause of this unintentional behavior and fixed it.
The fix should be available in the next update to Stata 12.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index