This function creates a categorical variable that flags for increased short term health risks due to their drinking habits, according to Canada's Low-Risk Alcohol Drinking Guideline.
low_drink_short_fun(
DHH_SEX,
ALWDWKY,
ALC_1,
ALW_1,
ALW_2A1,
ALW_2A2,
ALW_2A3,
ALW_2A4,
ALW_2A5,
ALW_2A6,
ALW_2A7
)
Sex of respondent (1 - male, 2 - female)
Number of drinks consumed in the past week
Drinks in the past year (1 - yes, 2 - no)
Drinks in the last week (1 - yes, 2 - no)
Number of drinks on Sunday
Number of drinks on Monday
Number of drinks on Tuesday
Number of drinks on Wednesday
Number of drinks on Thursday
Number of drinks on Friday
Number of drinks on Saturday
Categorical variable (ALWDVSTR_der) with two categories:
1 - Increased short term health risk
2 - No increased short term health risk
The classification of drinkers according to their short term health risks comes from guidelines in Alcohol and Health in Canada: A Summary of Evidence and Guidelines for Low-risk Drinking, and is based on the alcohol consumption reported over the past week. Short-term or acute risks include injury and overdose.
Categories are based on CCHS 2015-2016's variable (ALWDVSTR) where short term health risk are increased when drinking more than 3 drinks (for women) or 4 drinks (for men) on any single occasion.
See https://osf.io/ykau5/ for more details on the guideline. See https://osf.io/ycxaq/ for more details on derivation of the function on page 9.
# Using low_drink_short_fun() to create ALWDVSTR_der values across CCHS cycles
# low_drink_short_fun() is specified in variable_details.csv along with the
# CCHS variables and cycles included.
# To transform ALWDVSTR_der, use rec_with_table() for each CCHS cycle
# and specify ALWDVSTR_der, along with the various alcohol and sex
# variables.
# Using merge_rec_data(), you can combine ALWDVSTR_der across cycles.
library(cchsflow)
short_low_drink2001 <- rec_with_table(
cchs2001_p, c(
"ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
"ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der"
)
)
#> No variable_details detected.
#> Loading cchsflow variable_details
#> Using the passed data variable name as database_name
#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
head(short_low_drink2001)
#> ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
#> 1 1 1 0 0 1 0 1 0 0 2
#> 2 2 NA(a) NA NA NA NA NA NA NA NA
#> 3 1 1 0 0 0 1 6 0 1 8
#> 4 1 2 NA NA NA NA NA NA NA 0
#> 5 1 1 0 0 0 0 0 8 0 8
#> 6 1 2 NA NA NA NA NA NA NA 0
#> DHH_SEX ALWDVSTR_der
#> 1 2 2
#> 2 2 NA(b)
#> 3 1 1
#> 4 2 NA(b)
#> 5 2 1
#> 6 1 NA(b)
short_low_drink2009_2010 <- rec_with_table(
cchs2009_2010_p, c(
"ALW_1", "DHH_SEX", "ALW_2A1", "ALW_2A2", "ALW_2A3", "ALW_2A4",
"ALW_2A5", "ALW_2A6", "ALW_2A7", "ALWDWKY", "ALC_1","ALWDVSTR_der"
)
)
#> No variable_details detected.
#> Loading cchsflow variable_details
#> Using the passed data variable name as database_name
#> NOTE for ALWDWKY: shown as categorical variable in CCHS 2014 cycle
tail(short_low_drink2009_2010)
#> ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
#> 195 2 NA(a) NA NA NA NA NA NA NA NA
#> 196 1 2 NA NA NA NA NA NA NA 0
#> 197 2 NA(a) NA NA NA NA NA NA NA NA
#> 198 2 NA(a) NA NA NA NA NA NA NA NA
#> 199 2 NA(a) NA NA NA NA NA NA NA NA
#> 200 1 2 NA NA NA NA NA NA NA 0
#> DHH_SEX ALWDVSTR_der
#> 195 2 NA(b)
#> 196 2 NA(b)
#> 197 2 NA(b)
#> 198 1 NA(b)
#> 199 2 NA(b)
#> 200 2 NA(b)
combined_short_low_drink <- bind_rows(short_low_drink2001,
short_low_drink2009_2010)
head(combined_short_low_drink)
#> ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
#> 1 1 1 0 0 1 0 1 0 0 2
#> 2 2 NA(a) NA NA NA NA NA NA NA NA
#> 3 1 1 0 0 0 1 6 0 1 8
#> 4 1 2 NA NA NA NA NA NA NA 0
#> 5 1 1 0 0 0 0 0 8 0 8
#> 6 1 2 NA NA NA NA NA NA NA 0
#> DHH_SEX ALWDVSTR_der
#> 1 2 2
#> 2 2 NA(b)
#> 3 1 1
#> 4 2 NA(b)
#> 5 2 1
#> 6 1 NA(b)
tail(combined_short_low_drink)
#> ALC_1 ALW_1 ALW_2A1 ALW_2A2 ALW_2A3 ALW_2A4 ALW_2A5 ALW_2A6 ALW_2A7 ALWDWKY
#> 395 2 NA(a) NA NA NA NA NA NA NA NA
#> 396 1 2 NA NA NA NA NA NA NA 0
#> 397 2 NA(a) NA NA NA NA NA NA NA NA
#> 398 2 NA(a) NA NA NA NA NA NA NA NA
#> 399 2 NA(a) NA NA NA NA NA NA NA NA
#> 400 1 2 NA NA NA NA NA NA NA 0
#> DHH_SEX ALWDVSTR_der
#> 395 2 NA(b)
#> 396 2 NA(b)
#> 397 2 NA(b)
#> 398 1 NA(b)
#> 399 2 NA(b)
#> 400 2 NA(b)
# Using low_drink_short_fun() to generate ALWDVSTR_der with user-inputted
# values.
#
# Let's say you are a male, you had drinks in the last week and in the last
# year. Let's say you had 5 drinks on Sunday, 1 drink on Monday, 6 drinks on
# Tuesday, 4 drinks on Wednesday, 4 drinks on Thursday, 8 drinks on Friday,
# and 2 drinks on Saturday with a total of 30 drinks in a week.
# Using low_drink_short_fun(), we can check if you would be classified as
# having an increased short term health risk due to drinking.
short_term_drink <- low_drink_short_fun(DHH_SEX = 1, ALWDWKY = 30, ALC_1 = 1,
ALW_1 = 1, ALW_2A1 = 5, ALW_2A2 = 1, ALW_2A3 = 6, ALW_2A4 = 4, ALW_2A5 = 4,
ALW_2A6 = 8, ALW_2A7 = 2)
print(short_term_drink)
#> [1] 1