Description Usage Arguments Details Value Examples
View source: R/clean_demographic.R
Processes demographic variables.
1 |
data |
Data table - the Health Survey for England/Scotland Health Survey dataset. |
ETHNICITY In an attempt to harmonise different years of data to the receomended definitions, we have pooled the asian and other categories.
White (English, Irish, Scottish, Welsh, other European)
Mixed / multiple ethnic groups
Asian / Asian British (includes African-Indian, Indian, Pakistani, Bangladeshi), plus Other ethnic group (includes Chinese, Japanese, Philippino, Vietnamese, Arab)
Black / African / Caribbean / Black British (includes Caribbean, African)
Following inspection of the data, the white/non-white classification does look appropriate, especially given the likely limited sample sizes - so the 2 level variable has also been created.
For 2008-2013 of the Scottish Health Survey, we can create the same 4-category variable as for the HSE, howvere for 2014 onwards, the Scottish Health Survey 2018 only identifies 5 groups of ethnicity:
White (Scottish)
White (Other British)
White (Other)
Asian
Other minority ethnic
On the basis of this, only the 2 level variable (white/non-white) has been created for all years for Scotland.
ethnicity_4cat: 4 level variable (see above).
ethnicity_2cat: 2 level variable (white/nonwhite).
sex: m/f
imd_quintile
1 2 3 4 5 6 7 8 | ## Not run:
data_2001 <- read_2001()
data_2001 <- clean_demographic(data = data_2001)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.