I'd like to make a plot with the margins results for multiple variables
Simply, using auto, I do this:
reg price i.foreign i.rep78
margins foreign rep78
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
foreign |
Domestic | 6134.857 474.7025 12.92 0.000 5186.239 7083.474
Foreign | 6171.614 790.5026 7.81 0.000 4591.92 7751.307
|
rep78 |
1 | 4575.687 2146.133 2.13 0.037 286.9831 8864.391
2 | 5978.812 1105.625 5.41 0.000 3769.397 8188.227
3 | 6436.745 585.9965 10.98 0.000 5265.724 7607.765
4 | 6064.308 735.0801 8.25 0.000 4595.368 7533.249
5 | 5894.113 1043.948 5.65 0.000 3807.949 7980.277
------------------------------------------------------------------------------
Now I'd like one figure for these margins, with two groups of scatter, one for each variable. As if I did this:
margins foreign
marginsplot, recast(scatter)
margins rep78
marginsplot, recast(scatter)
But got them in one figure using the same x- and y-axis.
Appreciate any tips!
Related Posts with plot with margins from different variables in one model
EVENTDD error message with cross section dataI'm working with BRFSS data and its a cross section data. Need to create event study analysis and I …
Truncated Weibull Distribution ?Dear Experts, I kindly ask if one of you have any idea on how I could fit a zero-truncated Weibull …
Indicate loss of observations by variableDear Statalist Community, I am looking for a command that tells me how many observations are lost w…
Tools for creating HTML documents with StataDoes anyone have preferred options for creating HTML documents that incorporate Stata code? I've hea…
How to create a graph like this in STATA?I am conducting an event study where I want to graph out cumulative abnormal returns surrounding the…
Subscribe to:
Post Comments (Atom)
0 Response to plot with margins from different variables in one model
Post a Comment