1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
* Index of dissimilarity
	 Formulas from p 236 of Negroes in Cities (1965) by Karl and Alma Taeuber.

* This assumes that the populations are already sorted by bins.
* rlevesque@videotron.ca 2001/09/14.

DATA LIST LIST /cat PopA PopB.
BEGIN DATA
1 .15 .12
2 .15 .17
3 .10 .12
4 .12 .12
5 .18 .11
6 .20 .2
7 .1 .16
END DATA.
LIST.

COMPUTE index=ABS(PopA-PopB)*.5.
VARIABLE LABEL index 'Index of Dissimilarity'.
SUMMARIZE
  /TABLES=popa popb index
  /FORMAT=NOLIST TOTAL
  /TITLE='Index of Dissimilarity'
  /MISSING=VARIABLE
  /CELLS=SUM .