clean_demographic: Demographic variables

Description Usage Arguments Details Value Examples

View source: R/clean_demographic.R

Description

Processes demographic variables.

Usage

1

Arguments

data

Data table - the Health Survey for England/Scotland Health Survey dataset.

Details

ETHNICITY In an attempt to harmonise different years of data to the receomended definitions, we have pooled the asian and other categories.

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:

On the basis of this, only the 2 level variable (white/non-white) has been created for all years for Scotland.

Value

Examples

1
2
3
4
5
6
7
8
## Not run: 

data_2001 <- read_2001()

data_2001 <- clean_demographic(data = data_2001)


## End(Not run)

dosgillespie/hseclean documentation built on May 2, 2020, 1:15 a.m.