```-------------------------------------------------------------------------------
help for dicseg                                  Carlos Gradín (September 2010)
-------------------------------------------------------------------------------

Overall Segregation indices with optional segregation curve for the case of two
>  groups
(For multigroup cases see localseg)

dicseg unitvar groupvar [weights] [if exp] [in range] [,
format(string) save sc nograph x(string) y(string)
xtitle(string) ytitle(string) graph_options(string) ]

fweights, aweights and aweights are allowed; see weights.

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-groups context.

Micro data are required (data should not be collapsed by units).

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

The second variable groupvar identifies dichotomous groups such as gender
(male vs. female), race (white versus non-white), ...

If option sc is specified it also draws the segregation curve, and
creates new variables using x(string) and y(string) options (you can also
use other graph options).

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

Reporting

Segregation indices (See Gradín, 2010):

. Duncan & Duncan, the Duncan and Duncan (1955) index of
dissimilarity.

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

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

Note: GE(c) is not defined for some c when one group has no
observations at one or more units. In those cases only well-defined
indices are reported.

. Hutchens Sq. root, the Hutchens square root index (Hutchens, 1991,
2004). Note that it is equivalent to GE(.5)/4

. Mutual Information, (Frankel and Volij, 2007, 2008) with natural
logs instead of log(2).

. Gini, the Gini index.

Note that Duncan, Gini, and Hutchens are bounded between 0, when
there is no segregation because both groups have the same distribution
across units, and 1, when segregation is at its maximum because there is
no overlap between both distributions.

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

Options

format(string) to change numeric format

save to save results

sc to compute segregation curves

nograph to do not graph segregation curves (if sc was specified)

x(string) y(string) to create variables for segregation curves (if sc was
specified)

xtitle(string),ytitle(string) title for segregation curves (if sc was
specified)

graph_options(string) to change default graph options for segregation
curve (if sc was specified)

Saved results

Matrix:

r(seg) : segregation indices

Examples

. use segdata.dta, clear

. dicseg occupation white [aw=pwgtp], sc save

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

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

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

Author

Facultade de CC. Económicas
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 (2010),  Conditional occupational segregation of
minorities in the U.S., Ecineq Working Paper Series 2010-185.

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.

Also see

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

```