Dear Statalist - users,
I'm working with the package ginidesc that i installed from ssc to compute gini-coefficients for subpopulations within countries.
Here are the commands I used and parts of the resulting output:
I tried to store the Gini-coefficients in a variable with the following commands:
This created 2 variables, one for each column, but the gini-coefficients are saved as the category and not the value of the variable. Also the information is now disconnected from the country - variable in the data set.
I would greatly appreciate if someone could tell me how to create one variable that has the same gini-coefficient for each observation within a country. Thanks a lot in advance!
I'm working with the package ginidesc that i installed from ssc to compute gini-coefficients for subpopulations within countries.
Here are the commands I used and parts of the resulting output:
Code:
ginidesc income_equivalised if incrank_2 == 1, by(country) gk(i1)
Code:
Gini Coefficient by subgroups of country ----------------------------- K | Gini_k -----------------+----------- Austria | 0.298 Belgium | 0.228 Bulgaria | 0.270 Cyprus | 0.294 Czech Republic | 0.290 Germany | 0.330 Denmark | 0.284 Estonia | 0.222 Stored in matrix i2
Code:
matrix list i1 svmat i1, names(inc)
Code:
tab inc2 inc2 | Freq. Percent Cum. ------------+----------------------------------- .1230075 | 1 3.03 3.03 .1402118 | 1 3.03 6.06 .1471672 | 1 3.03 9.09 .1478555 | 1 3.03 12.12 .1688081 | 1 3.03 15.15 .1694496 | 1 3.03 18.18 .1719411 | 1 3.03 21.21 .1736457 | 1 3.03 24.24 .1751534 | 1 3.03 27.27
Comment