help for dicseg (Version 2.2)Carlos Gradín (March 2015)

Segregation indices with optional segregation curve for the case of two groups with either individual data or aggregated data

(For multigroup cases see localseg)

-For individual data (each observation is an individual):

dicseg unitvar groupvar [weights] [if exp] [in range]
[, normalize format(%9.#f) sc nograph x(newvar) y(newvar) xtitle(xtitle) ytitle(ytitle) graph_options(graph_options) ]

fweights, aweights and aweights are allowed; see weights.

-For aggregated data (each observation is a unit):

dicseg unitvar group1var group2var [if exp] [in range]
, aggregate [ normalize format(%9.#f) sc nograph x(newvar) y(newvar) xtitle(xtitle) ytitle(ytitle) graph_options(graph_options) ]

Important

It requires to have matsort, written by Paul Millar, previously installed; if not, install it writing in the command line:

. net install matsort, all from(http://fmwww.bc.edu/RePEc/bocode/m)

Description

dicseg computes segregation indices across units in a two-group context.

By default, microdata (individual observations) are required.

unitvar indicates units (ex. occupations, census tracts, schools, ....).

groupvar is a dichotomous variable identifying two groups such as gender (male vs. female), race (white versus non-white), ...

For data aggregated by unit (each observation is a unit), use the aggregate option .

unitvar indicates units (ex. occupations, census tracts, schools, ....).

group1var and group2var identify the variables that give the number (or proportion) of individuals from the first and second group respectively in each unit.

If option sc is specified it also draws the segregation curve, and creates new variables using x(newvar) and y(newvar) options.

x represents the group with the lowest value in groupvar and y the group with the highest value.

Reporting

Segregation indices (for formulae and details, see Gradín, 2014):

. Dissimilarity index.

. KM, the Karmel and Maclachlan (1988) index.

. GE(alpha) with alpha= -2, -1, 0, .10, .25, .50, .75, .90, 1, 2 is the family of Generalized Entropy measures for different values of the segregation sensitivity parameter. GE(1) is also known as Theil index.

Note: GE is infinite for some alpha when one group has no observations at one or more units: GE(alpha>=1) if group 1; GE(alpha<=0) if group 2. In those cases only finite cases are reported.

. Squared Root (Hutchens, 1991, 2004) is equivalent to GE(.5)/4

. A(epsilon) with epsilon= .10, .25, .50, .75, .90, 1, 2, 4 is the family of Atkinson indices for different values of the segregation sensitivity parameter.

Note: A(epsilon>1) is infinite when group 2 has no observations at one or more units. In those cases only finite cases are reported.

. Mutual Information (e.g. Theil and Finizza, 1971) using log(2).

. Gini, the Gini index.

All indices take the value 0 when there is no segregation because both groups have the same distribution across units.

Dissimilarity, Squared Root, A, M, Gini take the value 1 when segregation is at its maximum (no overlapping distributions).

Segregation Curve (if option sc is specified): as defined in Duncan and Duncan (1955) or Hutchens (1991).

Options

aggregate to use aggregated data, the default is to use individual data.

normalize to normalize GE(0<alpha<1) to range between 0 and 1, multiplying by alpha*(1-alpha). By default, the index is not normalized.

format(%9.#f) to change numeric format, the default is format(%9.4f).

sc to compute segregation curves.

nograph to do not graph segregation curves.

x(newvar) y(newvar) to create variables for segregation curves.

xtitle(xtitle),ytitle(ytitle) to change the title of segregation curves.

graph_options(graph_options) to change default graph options for segregation curves.

Saved results

Matrix:

r(seg) : segregation indices

Scalars:

r(D), r(KM), r(GEm2), r(GEm1), r(GE0), r(GE10), r(GE25), r(GE50), r(GE75), r(GE90), r(GE1), r(GE2), r(H), r(CV), r(A10), r(A25), r(A50), r(A75), r(A90), r(A1) r(A2), r(A4), r(Mutual), r(Gini)

r(freq1), r(freq2), r(nunits)

Examples

. use segdata.dta, clear

For individual data:

. dicseg occupation white [aw=pwgtp], sc

. ret list

. dicseg occupation2 sex [aw=pwgtp], nor sc

. dicseg occupation white [aw=pwgtp], sc x(cumnonwhite) y(cumwhite) xt(Cumulative proportion of nonwhites) yt(Cumulative proportion of whites)

. dicseg occupation sex [aw=pwgtp], sc x(cummale) y(cumfemale) xt(Cumulative proportion of males) yt(Cumulative proportion of females)

For aggregated data (we first collapse data by occupation):

. collapse (sum) white nonwhite [iw=pwgtp] , by(occupation)

. dicseg occupation nonwhite white , ag sc

For bootstrapping (BC estimates) with individual data, using saved scalars (copy and paste the following in the command line or in a .do file)

use segdata.dta, clear

cap program drop dseg

program def dseg

dicseg occupation2 sex [aw=pwgtp]

end

bootstrap r(D) r(KM) r(GE1) r(H) r(M) r(G) , reps(10): dseg

estat bootstrap

Author

Carlos Gradín
<cgradin@uvigo.es>

Facultade de CC. Económicas

Universidade de Vigo

36310 Vigo, Galicia, Spain.

References

Duncan, Otis D. and Duncan, Bervely (1955), A Methodological Analysis of Segregation Indexes, American Sociological Review, 20(2): 210-217.

Gradín, Carlos (2014), Measuring Segregation using Stata, Universidade de Vigo.

Hutchens, Robert M. (1991), Segregation Curves, Lorenz Curves, and Inequality in the Distribution of People across Occupations, Mathematical Social Sciences, 21: 31- 51.

Hutchens, Robert M. (2004), One Measure of Segregation, International Economic Review 45(2): 555-578.

Karmel, T. and Maclachlan M. (1988), Occupational Sex Segregation - Increasing or Decreasing, Economic Record, 64: 187-195.

Theil, Henri and Anthony J. Finizza (1971), A Note on the Measurement of Racial Integration of Schools by Means of Informational Concepts, Journal of Mathematical Sociology, 1: 187-194

Also see

duncan if installed; hutchens if installed; localseg if installed; seg if installed