Announcement

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

  • Dividing a column by another

    Hello everyone,
    I use the command below in Stata 17 to calculate the total income and total tax paid in each quintile (Q) and each group (Status). How can I add a column to this table calculating the tax column divided by the income column? In other words, how can I calculate the share of total tax in total income for each quintile and group?

    table (Q Status)(), statistic(frequency) statistic (sum income) statistic (sum tax) statistic (percent tax) nformat(%12.0fc total) nformat(%12.2fc percent) sformat("%s%%" percent )
    Thanks.

  • #2
    Dear Amir Moayeri

    Would be much more helpful if you can provide a data example of your dataset using -dataex-
    Plase, use
    Code:
    ssc install dataex
    With an example I can better see what do you need

    Comment

    Working...
    X