Announcement

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

  • Problem with displaying multiple models using coefplot recast(bar)

    Dear all,

    I am struggeling with displaying multiple graphs with the recast(bar) option from -coefplot- (SSC). I have multiple models, where two models each have the same explanatory variable but different outcomes (same outcome but at two different points in time). I want to present the Odds Ratios for only the coefficients from the main explanatory variable in one model, however, because I use the same explanatory variable, my bars in the coefplot overlap. I have tried multiple different things but cannot seem to separate them.

    My code looks like this:

    Regressions:
    Code:
    melogit LR_decline volunteerwork i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_vol
    melogit LR_decline educationalcourse i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_edu
    melogit LR_decline clubs i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_clu
    melogit LR_decline politicalorg i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_pol
    melogit LR_decline reading i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_rea
    melogit LR_decline numbergames i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_num
    melogit LR_decline strategicgames i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_str
    *
    melogit LR_decline2 volunteerwork i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_vol2
    melogit LR_decline2 educationalcourse i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_edu2
    melogit LR_decline2 clubs i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_clu2
    melogit LR_decline2 politicalorg i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_pol2
    melogit LR_decline2 reading i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_rea2
    melogit LR_decline2 numbergames i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_num2
    melogit LR_decline2 strategicgames i.agecat i.educ_impute i.wealthgroup female ///
        foreign_impute inactivity || country:, or
    eststo m1_str2
    The Code for the Coefplot looks like:

    Code:
     coefplot m1_vol m1_vol2 m1_edu m1_edu2 m1_clu m1_clu2 m1_pol m1_pol2 m1_rea ///
        m1_rea2 m1_num m1_num2 m1_str m1_str2, keep(volunteerwork ///
        educationalcourse clubs politicalorg reading numbergames strategicgames ) ///
        omitted baselevels recast(bar) barwidth(0.35) vert citop ciopts(recast(rcap)) ///
        scheme(cleanplots) yline(1) legend(pos(6) ring(3) row(2)) eform ///
        ytitle(Odds Ratios: List Recall)
    The graph I get using the code looks like this:

    Click image for larger version

Name:	test1.png
Views:	1
Size:	58.3 KB
ID:	1690093


    However, I would like it to look something like:

    Click image for larger version

Name:	test.png
Views:	1
Size:	14.7 KB
ID:	1690094



    Is there a possibility to achieve this using coefplot?

    I appreciate any help!
Working...
X