Announcement

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

  • Adding a ratio across rows in -table-

    HTML Code:
    sysuse auto, replace
    describe
    table (foreign) (rep78), stat(mean length) nototals stat(proportion, across(foreign))
    I want to generate a row that represents the division of the means in Row 1 / Row 2. How can I solve this? -stat(proportion) does not solve this.



    --------------------------------------------------------------------
    | Repair record 1978
    | 1 2 3 4 5
    -------------------+------------------------------------------------
    Car origin |
    Domestic |
    Mean |
    Length (in.) | 189 199.375 197.8889 204.4444 160
    Proportion | 1 1 .9 .5 .1818
    Foreign |
    Mean |
    Length (in.) | 159 165.2222 172.4444
    Proportion | .1 .5 .8182
    --------------------------------------------------------------------
    The final row should have, for example in column 5, 160/172 = 0.93
Working...
X