Title

RIIGEN - Stata module to generate Variables to Compute the Relative Index of Inequality

Syntax

riigen varlist [if] [in] [weight]
[ , varprefix(string) riiname(string) replace]

Description

The relative index of inequality (RII) is a regression-based index of inequality regarding one outcome by levels of a determinant. Usually,
it summarizes the magnitude inequalities in health between socio-economic status (SES) groups. RII is useful because it takes into account
the size of the population and the relative diadvantage experienced by different groups. The outcome is regressed on the proportion of the
population that has a lower (or, alternatively, a higher) position in the hierarchy. It is particularly valuable when comparing effects of
risk factors (independent variables) have different scales and/or group sizes. When using aggregated data and a linear regression model on
Prevalences as Outcome, the RII-Variable can be used to calculate the absolute Slope Index of Inequality (SII, see example 3 below)

Calculation:

1. Rank cases on the determinant (by subgroup)

2. For tied ranks and for categorical variables, assign the mean rank for all values

3. Divide the (weighted) cumulative number of cases with rank or lower with the sample size (or if weighted, the population size), creating a value ranging from 0 to 1

4. If contrast to high vs. low (riiorder(higher)) and not low vs. high (riiorder(lower)) is desired, reverse order by creating new value (= 1 - value).

riigen calculates new variables for a list of variables that allow to estimate the relative
index of inequality in regression models. It is possible to calculate the RII for a subsample using
if and in. The rii-Generator can also be used with by. Weighting is permitted. Note: The extremes of the RII-Variable (0/1) are archived, if there is just one case in the lowest/highest category of the determinant.

Options

varprefix()
Choose a new prefix for the generated variables. Default is varprefix("RII_"}).

riiname()
Choose a new String that should be attached as suffix to the variable label of the original
variable as label for the generated variable. Default is riiname("(RII)").

riiorder()
Change the sortorder of the generated RII. riiorder(higher) compares in refererence to the proportion in
higher positions, riiorder(lower) (default setting), compares in refererence to the proportion in lower positions.

replace Allow riigen to replace variables of name RII_oldvar if they already exist.

Examples

1) Default usage

. sysuse auto , clear

. riigen length

. poisson rep RII_length , nolog irr

2) Create RII for Subgroups

. webuse nhanes2.dta , clear

. by race , sort: riigen agegrp [iw=finalwgt] , replace

. svy: logit diabetes c.RII_agegrp##i.race , or nolog

3) Use RII to generate the SII (Slope Index of Inequality)

. webuse nhanes2.dta , clear

. gen popsize = 1

. collapse (mean) diabetes (sum) popsize [fw=round(finalwgt)] , by( sex agegrp)

. gen popsize = 1

. riigen agegrp [fw= popsize ] , varprefix(SII) riiname((SII))

. reg diabetes i.sex c.SII

References

Mackenbach JP, Kunst AE (1997) Measuring the magnitude of socio-economic inequalities in health: An overview of available measures illustrated with two examples from Europe. Social Science and Medicine 44 (6): 757-771

Mackenbach JP, Stirbu I, Roskam A-JR et al. (2008) Socioeconomic Inequalities in Health in 22 European Countries. The New England Journal of Medicine 358 (23): 2468-2481

Author

Dr. Lars E. Kroll, email

Citation

If you are using riigen for a publication, please cite Mackenbach, Kunst (1997) and this ADO:

Kroll, LE (2013) RIIGEN: Stata module to generate Variables to Compute the Relative Index of Inequality. Boston College Department of Economics, revised 21 Nov 2013.

Also see

On-line: help for by, svyset