Bookmark and Share

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


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

st: RE: marginsplot is acting differently


From   "Philip Ryan" <[email protected]>
To   <[email protected]>
Subject   st: RE: marginsplot is acting differently
Date   Sat, 31 Dec 2011 12:13:12 +1030

Richard,

I this what you are after?  (it's a cover-up kludge, although it avoids the
Graph Editor; it would be nice if marginsplot at least had an option to
suppress the output for the reference categories.)

webuse nhanes2f, clear
logit diabetes i.black i.female age, nolog 
margins, dydx(black female) at(age=(20 30 40 50 60 70)) vsquish 
marginsplot, noci plot1opts(connect(i) msymb(i)) plot3opts(connect(i)
msymb(i)) ///
legend(order(2 "effect on Pr(diabetes) for blacks"  4 "effect on
Pr(diabetes) for females")  rows(2))


best wishes to all for 2012.

Phil

Philip Ryan
Professor and Director
Data Management & Analysis Centre
School of Population Health & Clinical Practice
University of Adelaide

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Richard Williams
Sent: Saturday, 31 December 2011 8:49 AM
To: [email protected]
Subject: st: marginsplot is acting differently

-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.black 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 1.black and 1.female,
which is what I want. But, when I run it now, I also get lines for 0b.black
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!

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

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


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