Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Coefplot: creating one graph with mutliple panes and multiple models per pane

    Dear Stata users,

    I do have a rather basic question regarding coefplot (from SSC using Stata 18.0). I have five different dependent variables and I run three different estimations for each dependent variable. Eventually, I would like to graph the results from all 15 model in one graph using coefplot. I do use an inelegant option of doing that using the graph combine command (which results in a graph attached below. Clearly, there are to many y axis legends and other noise that makes my graph unusable. I would prefer to make the final graphs using coefplot command and its options, but so far I failed to figure out how do do that exactly. I would be glad for any guidance for my basic question.

    Code:
    logistic Sec i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Speaker_ID)
    estimates store Model1
    logistic Sec i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Party_ID)
    estimates store Model2
    firthlogit Sec i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, or
    estimates store Model3
    coefplot (Model1, label(Model1)) (Model2, label(Model2)) (Model3, label(Model3)), drop(_cons) xline(0) levels(95 90) name(Graph1, replace)
    margins, dydx(*) post
    marginsplot, horizontal xline(0) yscale(reverse) recast(scatter)
    logistic Eco i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Speaker_ID)
    estimates store Model4
    logistic Eco i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Party_ID)
    estimates store Model5
    firthlogit Eco i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, or
    estimates store Model6
    coefplot (Model4, label(Model4)) (Model5, label(Model5)) (Model6, label(Model6)), drop(_cons) xline(0) levels(95 90) name(Graph2, replace)
    logistic Cul i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Speaker_ID)
    estimates store Model7
    logistic Cul i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Party_ID)
    estimates store Model8
    firthlogit Cul i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, or
    estimates store Model9
    coefplot (Model7, label(Model7)) (Model8, label(Model8)) (Model9, label(Model9)), drop(_cons) xline(0) levels(95 90) name(Graph3, replace)
    logistic Hum i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Speaker_ID)
    estimates store Model10
    logistic Hum i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Party_ID)
    estimates store Model11
    firthlogit Hum i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, or
    estimates store Model12
    coefplot (Model10, label(Model10)) (Model11, label(Model11)) (Model12, label(Model12)), drop(_cons) xline(0) levels(95 90) name(Graph4, replace)
    logistic Adm i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Speaker_ID)
    estimates store Model13
    logistic Adm i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, vce(cluster Party_ID)
    estimates store Model14
    firthlogit Adm i.Country_ID i.Opposition Left_Right GAL_TAN European_Integration i.Radical_right Party_size i.Period, or
    estimates store Model15
    coefplot (Model13, label(Model13)) (Model14, label(Model14)) (Model15, label(Model15)), drop(_cons) xline(0) levels(95 90) name(Graph5, replace)
    graph combine Graph1 Graph2 Graph3 Graph4 Graph5
    Here is the graph:


    Click image for larger version

Name:	Graph.png
Views:	1
Size:	193.2 KB
ID:	1730495


    Thank you.
Working...
X