help egen_inequal
-------------------------------------------------------------------------------

Title

[D] egen -- Extensions to generate inequality and poverty measures

Syntax for FGT poverty measures

egen [type] newvar = fgt(varname) [if] [in] , pline(varname or #) [ by(varlist) weights(varname) alpha(#) ]

Syntax for inequality measures

egen [type] newvar = inequal(varname) [if] [in] [, by(varlist) weights(varname) index(fcn) ]

Or alternatively,

egen [type] newvar = fcn(varname) [if] [in] [, by(varlist) weights( varname)]

Description

The set of programs in this package uses egen to create newvar of the optionally specified storage type equal to one of the standard inequality and Foster-Greer-Thorbecke (FGT) poverty measures.

(Note that egen may change the sort order of your data).

Options

+----------------+ ----+ Common options +---------------------------------------------------

The option by(varlist) means that computations are performed separately for each group defined by varlist.

The option weights(varname) means that computation of poverty and inequality measures are performed with weights taken from the values of variable varname.

+--------------------------+ ----+ Poverty function options +-----------------------------------------

pline(varname or #) is a non-optional parameter that defines the poverty line. The poverty line could be specified either as a variable or as a numeric value.

alpha(#) is an optional positive argument that specifies the parameter in the FGT-type poverty measures. alpha(0) corresponds to poverty rate; alpha(1) corresponds to average poverty gap index; alpha(2) corresponds to severity of poverty index. By default (alpha is not specified) the poverty rate is generated.

+-----------------------------+ ----+ Inequality function options +--------------------------------------

An optional parameter index(fcn) specifies the inequality function fcn that generates a new variable. The Gini inequality index is the default option (index is not specified). Alternative syntax uses the type of inequality index directly to generate the new variable. No index(fcn) parameter needs to be specified in that case. See examples for explanation.

list of inequality functions fcn:

------------------------------------------------------------------------- rmd the relative mean deviation cov the coefficient of variation sdl the standard deviation of logs gini the Gini index mehran the Mehran index piesch the Piesch index kakwani the Kakwani index theil Theil entropy index mld the mean log deviation entropy generalized entropy measure (GE -1) half generalized entropy measure (GE 2) -------------------------------------------------------------------------

Examples

To create a new variable gini_reg containing the value of gini coefficient for the distribution of household expenditure expend by region using household weight hhweight:

. egen gini_reg = inequal(expend), by(region) weight(hhweight) index(gini)

Alternative syntax:

. egen gini_reg = gini(expend), by(region) weight(hhweight)

To create a new variable mld_ur containing the value of mean log deviation for the distribution of household expenditure expend by urbrur (urban and rural) using household weight hhweight:

. egen mld_ur = inequal(expend), by(urbrur) weight(hhweight) ind(mld)

Alternative syntax:

. egen mld_ur = mld(expend), by(urbrur) w(hhweight)

To create a new variable p1_reg containing value of the average poverty gap corresponding to the poverty line specified in variable rpl for the distribution of household expenditure expend by region using household weight hhweight:

. egen p1_reg = fgt(expend), by(region) weight(hhweight) pl(rpl) alpha(1)

To create a new variable p0_reg containing the poverty rate corresponding to the poverty line equal to 1234 for the distribution of household expenditure expend by region using household weight hhweight:

. egen p0_reg = fgt(expend), by(region) w(hhweight) pl(1234) a(0)

Authors

M. Lokshin and Z. Sajaia (DECRG, The World Bank).

Also see

Online: help for egen, if installed: rspread, inequal, ineqdeco, poverty, povdeco