Hello Statalists,

Part of my data is as follows:
Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input double preterm float(age35 event female overobes)
0 0 0 0 0
0 0 0 1 0
0 0 0 0 0
0 0 0 1 0
0 0 0 0 1
0 0 0 1 1
0 0 0 0 1
0 0 0 1 1
0 0 0 0 2
0 0 0 1 2
0 0 0 0 2
0 0 0 1 2
0 1 0 0 0
0 1 0 1 0
0 1 0 0 0
0 1 0 1 0
0 1 0 0 1
0 1 0 1 1
0 1 0 0 1
0 1 0 1 1
0 1 0 0 2
0 1 0 1 2
0 1 0 0 2
0 1 0 1 2
1 0 0 0 0
1 0 0 1 0
1 0 0 0 0
1 0 0 1 0
1 0 0 0 1
1 0 0 1 1
1 0 0 0 1
1 0 0 1 1
1 0 0 0 2
1 0 0 1 2
1 0 0 0 2
1 0 0 1 2
1 1 0 0 0
1 1 0 1 0
1 1 0 0 0
1 1 0 1 0
1 1 0 0 1
1 1 0 1 1
1 1 0 0 1
1 1 0 1 1
1 1 0 0 2
1 1 0 1 2
1 1 0 0 2
1 1 0 1 2
0 0 1 0 0
0 0 1 1 0
end
label values overobes overobeslbl
label def overobeslbl 0 "neither", modify
label def overobeslbl 1 "overweight", modify
label def overobeslbl 2 "obese", modify
I want to first select a 1:2 case-control sample (event indicates case/non-case), matched on age35 and female. Then, I want to double the cases by adding cases to control in exposed and unexposed respectively (preterm indicates exposure/unexposure), like below.
case noncase
exposure a b+a
unexposure c d+c
Thanks!