Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Calculating Gini

From   Tom Trikalinos <>
Subject   Re: st: Calculating Gini
Date   Wed, 1 Sep 2004 22:29:01 +0300

How about creating a new variable that would code state & district:

. egen stateDist = group(state district)


. ginidesc income [fw=weight], by(stateDist)

Would this do your work?


On Sep 1, 2004, at 10:15 PM, Rijo John wrote:

Dear Stata users,

I was trying to calculate the gini coefficients using the formula

ginidesc income [fw=weight], by(state)

This gives me the desired results. But if I want to estimate it
for one more subgroup within "state", say some thing like

ginidesc income [fw=weight], by(state district)

It gives me the error

invalid syntax

Cant I specify more than one subgroup variable in the by statement of this
formula? Or is there any other easy way to compute only the gini
coefficients in STATA with such "by" options. I mean, without decomposing
into "within" and "between" groups, I want to estimate only the gini with
the "by" option. I had seen the command "inequal" but this doesnt have a
"by" option.

Any help will be highly appreciated.



* For searches and help try:

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index