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

Local and overall Segregation indices with optional local segregation curves, using either individual data or aggregated data

(For the two-group case see dicseg)

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

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

For measuring the segregation of each unit (representativeness perspective), swap the variables (only works with few units supoorted by tab groupvar unitvar):

localseg groupvar unitvar ...

fweights, aweights and aweights are allowed; see weights.

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

localseg unitvar group1var ... groupkvar [ if exp] [in range]
, aggregate [ 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

localseg computes local and overall segregation indices across units in a multigroup context, as proposed by Alonso-Villar and Del Río, 2010.

* A local segregation index compares the distribution of each group across units with that of the population.

(It is also possible to compute the segregation of each unit using the representativeness perspective).

* An overall segregation index measures the segregation of the population across units, that in some cases can also be obtained from aggregating local segregation for every group.

By default, microdata (individual observations) are required.

unitvar is a categorical variable identifying units (ex. occupations, census tracts, schools, ....). Each observation is an individual.

groupvar is a categorical variable identifying groups (gender, race, gender x race...).

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

unitvar is a categorical variable identifying units (ex. occupations, census tracts, schools, ....). Each observation is a unit.

group1var group2var ... groupkvar are integer (or real) variables that identify the number (or proportion) of individuals from each group in the corresponding unit.

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

Reporting

(see Alonso-Villar and Del Río, 2010 for formulae and references)

Overall Segregation indices:

. Ip, multigroup index of dissimilarity.

. M, the mutual information index.

Note that M = GE(1); Mutual Information Index M using with natural log.

. Gini, the unbounded version of the multigroup Gini index.

. Dissimilarity, the index of dissimilarity (only reported in the case of two groups).

Local Segregation indices:

. Ip, multigroup index of dissimilarity.

. K and K(a), Chakravarty and Silber (2007) multigroup indices.

. GE(c), c=0, .10, .25, .50, .75, .90, 1, family of indices related to the Generalized Entropy family, for different values of the segregation sensitivity parameter.

Note that M = GE(1); Mutual Information Index M [ with natural logs ].

. K, K(a) and GE(<=0) only reported for groups with members in all units.

. Gini, variation of the Gini index.

Each group's relative population share and contribution to overall segregation are also reported.

Segregation Curves (if option sc is specified).

Options

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

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.

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

Saved results

Matrices:

r(oseg) : overall segregation (first column) and relative contributions

r(lseg) : local segregation

Examples

. use segdata.dta, clear

For individual data:

. localseg occupation2 race [aw=pwgtp]

. ret list

. localseg occupation race [aw=pwgtp], sc

. localseg occupation race [aw=pwgtp], sc x(cumem) y(cumtgt) xt(Cumulative employment) yt(Cumulative target workers)

For representativeness:

. localseg race occupation [aw=pwgtp]

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

. collapse (sum) white black asian native hispanic other [iw=pwgtp] , by(occupation)

. localseg occupation white black asian native hispanic other , 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)

(Example for local segregation GE(1) using information for this index saved in matrix r(lseg), 16th row)

use segdata.dta, clear

cap program drop lseg

program def lseg

localseg occupation2 race [aw=pwgtp]

mat lseg=r(lseg)

local r=rowsof(lseg)

forvalues i=1/`r' {

scalar ls`i'=lseg[16,`i']

}

end

bootstrap ls1 ls2 ls3 ls4 ls5 ls6 , reps(10): lseg

estat bootstrap

Author

Carlos Gradín
<cgradin@uvigo.es>

Facultade de CC. Económicas

Universidade de Vigo

36310 Vigo, Galicia, Spain.

References

For theory:

Alonso-Villar, O. and C. Del Río (2010), Local versus Overall Segregation Measures, Mathematical Social Sciences, vol. 60(1), pp. 30-38.

For applications:

Alonso-Villar, O., C. Del Río, C., and C. Gradín, C. (2012),
The extent of occupational segregation in the US: Differences by race, ethnicity, and gender, Industrial Relations, 51(2): 179-212.

Del Río, C. and Alonso-Villar, O. (2010),
Gender segregation in the Spanish labor market: An alternative approach , Social Indicators Research, vol. 98 (2), September, pp. 337-362

Del Rio, C. and Alonso-Villar, O. (2012),
Occupational Segregation of Immigrant Women in Spain, Feminist Economics, 18(2): 91-123.

Gradín, C., O. Alonso-Villar, and C. Del Río (2014),
Occupational segregation by race and ethnicity in the US: Differences across states, Regional Studies, forthcoming.

Also see

dicseg if installed; duncan if installed; hutchens if installed; seg if installed