The community-contributed command coefplot
is not meant to be used like that.
Nevertheless, below is a toy example of how you could get what you want:
sysuse auto, clear
estimates clear
// code for identification strategy 1
regress price mpg trunk length turn if foreign == 0
estimates store A
regress price trunk turn if foreign == 0
estimates store B
regress price weight trunk turn if foreign == 0
estimates store C
regress price trunk if foreign == 0
estimates store D
// code for identification strategy 2
regress price mpg trunk length turn if foreign == 1
estimates store E
regress price trunk turn if foreign == 1
estimates store F
regress price weight trunk turn if foreign == 1
estimates store G
regress price trunk if foreign == 1
estimates store H
Then you draw the plot as follows:
local gap1 : display _dup(30) " "
local gap2 : display _dup(400) " "
local label1 |`gap1'|`gap1'|`gap1'|`gap2'
local gap3 : display _dup(25) " "
local gap4 : display _dup(400) " "
local label2 DV1`gap3'DV2`gap3'DV3`gap3'DV4`gap4'
coefplot (A, offset(-0.38)) (E, offset(-0.33)) ///
(B, offset(-0.15)) (F, offset(-0.1)) ///
(C, offset(0.09)) (G, offset(0.135)) ///
(D, offset(0.3)) (H, offset(0.35)), ///
vertical keep(trunk) coeflabels(trunk = `""`label1'""`label2'""') ///
xlabel(, notick labgap(0)) legend(off)
The code here uses Stata's toy auto
dataset to run a number of simple regressions for each foreign
category. The same dependent variable price
is used for illustration but you can use different variables in its place. The variable trunk
is assumed here to be the variable of interest.
What the above toy code snippet basically does is to save each set of regression estimates and then simulate pairs of models. The labels DV
are drawn based on a hack that i demonstrated recently in the following two questions:
The result is a very good approximation but will require experimentation from your part:
