Skip to content

Commit 869acec

Browse files
committed
Use 4 instead of 5 ethnicity categories
Stata code from correspondence with Daria Popova
1 parent 210f99a commit 869acec

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

input/InitialPopulations/compile/02_create_UKHLS_variables.do

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -475,16 +475,13 @@ ethn_dv -- Ethnic group (derived from multiple sources)
475475
17 arab
476476
97 any other ethnic group
477477
*/
478-
*Note: Missing ethnic group is combined with "Other"
479-
cap gen dot = .
480-
replace dot = 1 if ethn_dv>=1 & ethn_dv <=4 //white//
481-
replace dot = 2 if ethn_dv>=5 & ethn_dv<=8 //mixed //
482-
replace dot = 3 if ethn_dv>=9 & ethn_dv<=13 //asian//
483-
replace dot = 4 if ethn_dv>=14 & ethn_dv<=16 //black//
484-
replace dot = 5 if ethn_dv==17 | ethn_dv==97 //other, arab//
485-
replace dot = 5 if ethn_dv==-9 //missing//
478+
cap gen dot = .
479+
replace dot = 1 if ethn_dv>=1 & ethn_dv <=7 //white and mixed with white//
480+
replace dot = 2 if ethn_dv>=9 & ethn_dv<=13 //asian//
481+
replace dot = 3 if ethn_dv>=14 & ethn_dv<=16 //black//
482+
replace dot = 4 if ethn_dv==17 | ethn_dv==97 | ethn_dv==-9 | ethn_dv==8 //arab, mixed non-white, other and missing
486483
lab var dot "DEMOGRAPHIC: Ethnicity"
487-
cap label define dot -9 "missing" 1 "White" 2 "Mixed or Multiple ethnic groups" 3 "Asian or Asian British" 4 "Black, Black British, Caribbean, or African" 5 "Other or missing ethnic group"
484+
cap label define dot 1 "White" 2 "Asian or Asian British" 3 "Black, Black British, Caribbean, or African" 4 "Other or missing ethnic group"
488485
label values dot dot
489486
//fre dot
490487

src/main/java/simpaths/model/Person.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,6 @@ public enum DoublesVariables {
23792379
EquivalisedConsumptionYearly,
23802380
EquivalisedIncomeYearly, //Equivalised income for use with the security index
23812381
EthnicityWhite,
2382-
EthnicityMixed,
23832382
EthnicityAsian,
23842383
EthnicityBlack,
23852384
EthnicityOther,
@@ -3072,9 +3071,6 @@ public double getDoubleValue(Enum<?> variableID) {
30723071
case EthnicityWhite -> {
30733072
return dot.equals(Ethnicity.White) ? 1. : 0.;
30743073
}
3075-
case EthnicityMixed -> {
3076-
return dot.equals(Ethnicity.Mixed) ? 1. : 0.;
3077-
}
30783074
case EthnicityAsian -> {
30793075
return dot.equals(Ethnicity.Asian) ? 1. : 0.;
30803076
}

src/main/java/simpaths/model/enums/Ethnicity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
public enum Ethnicity {
44
White, // "White"
5-
Mixed, // "Mixed or Multiple ethnic groups"
65
Asian, // "Asian or Asian British"
76
Black, // "Black, Black British, Caribbean, or African"
87
Other, // "Other or missing ethnic group"

0 commit comments

Comments
 (0)