So, using this code:
Code:
sysuse auto, clear
reg trunk foreign gear_ratio if rep78 == 5 // Outcome = Trunk and sub-group = 4
estimates store trunk_s5
reg trunk foreign gear_ratio if rep78 == 4 // Outcome = Trunk and sub-group = 5
estimates store trunk_s4
reg mpg foreign gear_ratio if rep78 ==5 // Outcome = MPG and sub-group = 4
estimates store mpg_s5
reg mpg foreign gear_ratio if rep78 ==4 // Outcome = MPG and sub-group = 5
estimates store mpg_s4
reg turn foreign gear_ratio if rep78 ==5 // Outcome = Turn and sub-group = 4
estimates store turn_s5
reg turn foreign gear_ratio if rep78 ==4 // Outcome = Turn and sub-group = 5
estimates store turn_s4
coefplot (trunk_s4, keep(foreign) \ mpg_s4 \ turn_s4, keep(gear_ratio) \) ///
|| (trunk_s5, keep(foreign) \ mpg_s5 \ turn_s5, keep(gear_ratio) \) ///
|| , drop(_cons) aseq swapnames eqrename(*_s4 = "" *_s5 = "") ///
order(trunk turn mpg) bylabels("Subgroup 4" "Supgroup 5") ///
eqlabels(, asheading)Array
What I would REALLY like to have happen is for the two trunk variables (trunk_s4 and trunk_s5) to be on the same line (i.e., side-by-side), AND to be able to label that as "Trunk". And the same goes for MPG, Turn, etc. Is there a way to do that?? I have tried everything I can think of, and have been at this for several days now.
0 Response to Coefplot - multiple models with different dependent variables
Post a Comment