Announcement

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

  • Display total #observations for category consisting of 2 subgroups in Table (esttab)

    Dear All,

    I am evaluating how COVID-19 lockdowns affected domestic violence. For that I identified zip codes that have for instance an above the median number of White/Asian/Latin/Black people. In my table, I want to show that the overall # of observations always stay the same for every category. For that I include above and below the median values for each category. My problem is that I am unable to display the total observations per category, instead I am only able to display N for each subcategory (and of course those values vary across the subcategories although in sum they are all equal per category).
    Is there a way to sum up the observations of the subcategories to display total N at the end of each category?
    I attach a table and my code for you.

    Thank you very much in advance!

    Best regards,

    Katarine

    Table looks like this:
    Domestic Violence
    All Categories
    Lockdown Effect x% increase
    N 2376
    Above Median # White
    Lockdown Effect x%
    N 1336
    Below Median #White
    Lockdown Effect x%
    N 1040
    ......
    .....

    But I want it to look like this:
    Domestic Violence
    All Categories
    Lockdown Effect x%
    N 2376
    Above Median # White
    Lockdown Effect x%
    Below Median #White
    Lockdown Effect x%
    N 2376
    ....
    ....

    Code:
    Code:
    esttab m1 m2 m3 m4 using Table1.rtf, b(%5.3f) se(%5.3f) starlev(* .1 ** .05 *** .01) noabbrev lines nonumber nonotes obslast mlabel(Dom.Violence) varwidth(30) title(Table 1: Effect of Lockdown on Call Rate) coeflabel(1.COVID "Lockdown Effect") refcat(1.COVID "All Categories", nolabel) eform 
    esttab m9 m9a m9b m9c using Table1.rtf, append b(%5.3f) se(%5.3f) starlev(* .1 ** .05 *** .01) lines nonumber nonotes noobs varwidth(30) nomtitle coeflabel(1.COVID "Lockdown Effect") refcat(1.COVID "Above Median % White", nolabel) eform 
    esttab m9_1 m9aa m9bb m9cc using Table1.rtf,  append b(%5.3f) se(%5.3f) starlev(* .1 ** .05 *** .01) lines  nonumber nonotes noobs varwidth(30) nomtitle coeflabel(1.COVID "Lockdown Effect") refcat(1.COVID "Below Median % White", nolabel) eform
Working...
X