Announcement

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

  • COEFPLOT - Headings Command

    Dear Statalist Users,

    I have been trying to create a graph using the coefplot command in STATA. However, the 'headings' command seem not to be creating the headings that I want, and I was wondering if there was anything that I was doing wrong? Your help would be greatly appreciated!

    Code:
    coefplot (A1, label(LIC)) (B1, label(LMIC)) (C1, label(UIC)),              ///
             drop(_cons) xline(1) eform xtitle(Odds ratio (Log Scale))        ///    
             order (*.sex *.agecat *.c7_cat *.c5_cat *.c8_cat                 ///
                    1.a2 1.t1 1.p13 1.h7a 1.h2a 1.mh9 1.mh10)                 ///
             headings(                                                        ///
                 1.agecat  =   "{bf:Age Group}"                             ///
                 1.c7_cat  =   "{bf:Marital Status}"                       ///
                 1.c5_cat  =   "{bf:Education Level}"                           ///
                 1.c8_cat  =   "{bf:Employment Status}", labsize(vsmall)labgap(-130))                       ///    
            coeflabels(2.sex = "Female Sex" 2.agecat = "Age: 31-40" 3.agecat = "Age: 41-50" 4.agecat = "Age: 51-69" ///
                   2.c7_cat = "Married or Cohabitating" 3.c7_cat = "Married or Divorced" 4.c7_cat = "Widowed"   ///
                   2.c5_cat = "Primary School" 3.c5_cat = "Secondary School" 4.c5_cat = "High School" 5.c5_cat = "College or More" ///
                   2.c8_cat = "Self-Employed" 3.c8_cat = "Student/Non-paid Work" 4.c8_cat = "Homemaker" 5.c8_cat = "Retired" 6.c8_cat = "Unemployed" ///
                   1.a2 = "Alcohol Use" 1.t1 = "Smoking" 1.p13 = "Physical Activity" 1.h7a = "High Blood Sugar" 1.h2a = "High Blood Pressure" ///
                   1.mh9 = "Family History of Attempted Suicide" 1.mh10 = "Death in Family Due to Suicide" ///
                   , labsize(vsmall)) legend(size(vsmall)rows(1)) xlabel(,labsize(vsmall)) msize(small) xla(, labsize(vsmall)) ///      
             graphregion(margin(l=5))  graphregion(color(dimgray))    ///
            title(Suicidal Ideation, color("0 51 102"))
    Here is the output below (without the headings):

    Click image for larger version

Name:	Picture1.png
Views:	1
Size:	222.9 KB
ID:	1730386
Working...
X