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: Overlaying margins plots from different models
From
Dmitriy Poznyak <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: Overlaying margins plots from different models
Date
Thu, 29 Mar 2012 11:22:46 -0700 (PDT)
Hello everyone,
I am estimating the differences in the effects of the same dependent variables on two different measures of the same dependent variable. My dependent variables in Model 1 and Model 2 are transformed to be on the same scale in both cases. The goal is to visualize the difference in the effects using the "margins" command, followed by the "marginsplot".
In a nutshell, my routine is as follows
Model 1:
xtreg y x z
margins, at(x =(0... 1)) vsquish post
marginsplot
Model 2:
xtreg y1 x z
margins, at(x =(0... 1)) vsquish post
marginsplot
I would like to overlay two graphs but unfortunately, I don't seem to find the way to do this. My understanding is that I can't overlay two graphs from different models saved in the memory. However, I assume I should be able to save the estimated parameters for both graphs (that is, marginal probabilities and standard errors), following the "margins" command and then overlay two graphs. If someone envisions the way to do this, I'd appreciate the tips.
Thank you for your input,
Dmitriy
*
* 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/