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.
Related Posts with Dividing a column by another
selection variable by loop 95% samples in stata16Dear Statistical users: For help, I want to randomly select 95% of a sample for logistic regression,…
ttest across multiple categoriesI am trying to replicate Table 2 from this paper http://ftp.iza.org/dp5706.pdf, where the difference…
select cases based on grouping variableHello, Please help me with this one: I have a database: Code: * Example generated by -dataex-. To i…
Move variable names to 1 row observationsI would like to move variable names to the 1st row observations (as string) In the following exampl…
Transpose dataset with variable datesHi, I would like to transpose the following dataset, in a way that I change the format from long to…
Subscribe to:
Post Comments (Atom)
0 Response to Dividing a column by another
Post a Comment