Announcement

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

  • grouping dimensions with borders

    I want horizontal lines separating my the levels of my first dimension. I can almost obtain this using by adding the option "spacer" . But spacer gives me blank lines instead of borders between the groups:

    Code:
    sysuse auto, clear
    egen price_n4=cut(price), group(4)
    table (rep78 foreign) (price_n4), stat(mean headroom) nototals
    collect style row split, delimiter(`" # "') atdelimiter(`" @ "') bardelimiter(`" | "') binder(`"="')  dups(first) position(left) span spacer
    collect preview
    gives...


    price_n4
    0 1 2 3

    Repair record 1978 1 Car origin Domestic 1.75

    2 Car origin Domestic 3.25 3 4

    3 Car origin Domestic 3.142857 3.5 2.7 3.357143
    3 Foreign 3 2.5 2.5

    4 Car origin Domestic 3 2.75 3.625 4
    4 Foreign 3.5 2.75 2 2.375

    5 Car origin Domestic 2 2.5
    5 Foreign 2.75 2 2.625 2.75

    but I want borders not lines separating the levels of my first dimension
    Code:
    rep78
    .

    Thanks
    Joakim
Working...
X