Sascha O. Becker and Marco Caliendo 7
Table 1: Illustrative Example
Stratum |
Yi = 0 |
Yi = 1 |
Si = 1 (Males) Di = 1 |
33 |
5 |
Di = 0 |
645 |
36 |
Si = 2 (Females) Di = 1 |
19 |
10 |
Di = 0 |
518 |
58 |
Source: Rosenbaum (2002), p. 130.
. clear
. set obs 719
obs was 0, now 719
. gen s = 1
. gen d = _n<=38
. gen out = _n<=5
. replace out = 1 if _n>38&_n<75
(36 real changes made)
. save s1.dta, replace
file s1.dta saved
.
. clear
. set obs 605
obs was 0, now 605
. gen s = 2
. gen d = _n<=29
. gen out = _n<=10
. replace out = 1 if _n>29&_n<88
(58 real changes made)
. save s2.dta, replace
file s2.dta saved
.
. append using s1.dta
. gen myweight = 1
. gen mysupport = 1
. bys s: tab out d
-> s = 1
out |
d | ||
0 |
1 |
Total | |
0 |
645 |
33 |
678 |
1 |
36 |
5 |
41 |
Total |
681 |
38 |
719 |