Hello,
I am computing Gini coefficients for different income distributions and want to create a simple table which shows the Gini coefficient for each respective distribution.
I am currently using 7 distributions (c_1 till c_7), and using the command ineqdeco to compute Gini coefficients.
This is the code I have written so far:
I simply save the Gini as a unique local and then list all the Gini coefficients. However, I want to create a table with two columns (distribution & Gini coefficient) which shows the type of distribution and respective Gini in each row.
I have never done something like this and my use of locals was my best guess as a starting point. I am not able to find a guide for this in the Stata manuals, since I do not know where to look.
Could anyone help me or push me in the right direction?
Thanks!
I am computing Gini coefficients for different income distributions and want to create a simple table which shows the Gini coefficient for each respective distribution.
I am currently using 7 distributions (c_1 till c_7), and using the command ineqdeco to compute Gini coefficients.
This is the code I have written so far:
Code:
foreach i of numlist 1/7 {
ineqdeco c_`i'
local gini_`i' = r(gini)
}
foreach i of numlist 1/7 {
display `gini_`i''
}
I have never done something like this and my use of locals was my best guess as a starting point. I am not able to find a guide for this in the Stata manuals, since I do not know where to look.
Could anyone help me or push me in the right direction?
Thanks!

Comment