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
How to place coefficient at a certain value in “coefplot”Dear All, I come across an error when using the 'coefplot' command. I want to plot the coefficient o…
Date format issueHi Is there a way to convert dates that have a format such as September 13 2005 to a date variable …
Generate variable of ratios of consecutive observations, by subgroupHello. I am working with a panel dataset as characterized below. Code: * Example generated by -da…
What are the advantage of adding interactive variable over subsampling in drawing conclusions?There are two main advantages of adding interaction variables over subsampling are: (1) having highe…
xtivreg2 warning that covariance matrix is not of full rank. Detecting singletons?Dear all, I am running the following code: . xtset id year . xi: xtivreg2 `t' (`z'=instrument_p) …
Subscribe to:
Post Comments (Atom)
0 Response to Dividing a column by another
Post a Comment