Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: marginsplot of marginal effects of a factor variable from a probit, including the baseline


From   "Dimitriy V. Masterov" <dvmaster@gmail.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: marginsplot of marginal effects of a factor variable from a probit, including the baseline
Date   Tue, 16 Apr 2013 18:26:23 -0700

Is it possible to get Stata to plot the the baseline probability from
a probit along with the marginal effects?

Here's a toy example I have in mind. I would like to use marginsplot
to show the marginal effects, along with the baseline for 1980:

webuse union, clear
tabstat union, by(year)
probit union ib(80).year
estimates store probit

margins, at(year=80) post // get the baseline rate
matrix M = r(b)
local bl = M[1,1]

estimates restore probit
margins, dydx(year)
marginsplot, yline(`bl')

Unfortunately this does not quite work, since the baseline rate is off
the chart in this case. Is there a way to patch this up or a more
elegant way to do this?

DVM
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index