This derived variable (ADL_der) is based on the CCHS derived variable ADLF6R which flags respondents who need help with tasks based on their response to the various activities of daily living (ADL) variables.
adl_fun(ADL_01, ADL_02, ADL_03, ADL_04, ADL_05)
A derived variable (ADL_der) with 2 categories:
- Needs help with tasks
- Does not need help with tasks
The CCHS derived variable ADLF6R uses different ADL variables across the various CCHS survey cycles. This newly derived variable (ADL_der) uses ADL variables that are consistent across CCHS cycles.
In the 2001 CCHS survey cycle, the ADLF6R variable examines the following ADL variables:
ADL_01 - Needs help preparing meals
ADL_02 - Needs help getting to appointments/errands
ADL_03 - Needs help doing housework
ADL_04 - Needs help doing personal care
ADL_05 - Needs help moving inside house
ADL_07 - Needs help doing heavy household chores
In the 2003-2005 CCHS survey cycles, the ADLF6R variable examines the following ADL variables:
ADL_01 - Needs help preparing meals
ADL_02 - Needs help getting to appointments/errands
ADL_03 - Needs help doing housework
ADL_04 - Needs help doing personal care
ADL_05 - Needs help moving inside house
ADL_06 - Needs help doing finances
ADL_07 - Needs help doing heavy household chores
In the 2007-2014 CCHS survey cycles, the ADLF6R variable examines the following ADL variables:
ADL_01 - Needs help preparing meals
ADL_02 - Needs help getting to appointments/errands
ADL_03 - Needs help doing housework
ADL_04 - Needs help doing personal care
ADL_05 - Needs help moving inside house
ADL_06 - Needs help doing finances
This newly derived variable (ADL_der) uses ADL_01 to ADL_05 which are consistent across all survey cycles. For any single CCHS survey year, it is appropriate to use ADLF6R. ADL_der is recommended when using multiple survey cycles.
# Using adl_fun() to create ADL_der values across CCHS cycles
# adl_fun() is specified in variable_details.csv along with the
# CCHS variables and cycles included.
# To transform ADL_der, use rec_with_table() for each CCHS cycle
# and specify ADL_der, along with the various ADL variables.
# Then by using merge_rec_data() you can combine ADL_der across cycles.
library(cchsflow)
adl2001 <- rec_with_table(
cchs2001_p, c(
"ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_der"
)
)
#> No variable_details detected.
#> Loading cchsflow variable_details
#> Using the passed data variable name as database_name
#> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?"
head(adl2001)
#> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
#> 1 2 2 2 2 2 2
#> 2 2 1 1 2 2 1
#> 3 2 2 2 2 2 2
#> 4 2 2 2 2 2 2
#> 5 2 2 2 2 2 2
#> 6 2 1 1 2 2 1
adl2009_2010 <- rec_with_table(
cchs2009_2010_p, c(
"ADL_01", "ADL_02", "ADL_03", "ADL_04", "ADL_05", "ADL_der"
)
)
#> No variable_details detected.
#> Loading cchsflow variable_details
#> Using the passed data variable name as database_name
#> NOTE for ADL_02: In the 2001 CCHS, respondents were asked, "Because of any condition or health problem, do you need the help of another person in shopping for groceries or other necessities?"
tail(adl2009_2010)
#> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
#> 195 2 2 2 2 2 2
#> 196 2 2 2 2 2 2
#> 197 2 2 2 2 2 2
#> 198 2 2 2 2 2 2
#> 199 2 2 2 2 2 2
#> 200 2 2 2 2 2 2
combined_adl <- merge_rec_data(adl2001, adl2009_2010)
head(combined_adl)
#> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
#> 1 2 2 2 2 2 2
#> 2 2 1 1 2 2 1
#> 3 2 2 2 2 2 2
#> 4 2 2 2 2 2 2
#> 5 2 2 2 2 2 2
#> 6 2 1 1 2 2 1
tail(combined_adl)
#> ADL_01 ADL_02 ADL_03 ADL_04 ADL_05 ADL_der
#> 395 2 2 2 2 2 2
#> 396 2 2 2 2 2 2
#> 397 2 2 2 2 2 2
#> 398 2 2 2 2 2 2
#> 399 2 2 2 2 2 2
#> 400 2 2 2 2 2 2
# Using adl_fun() to generate to ADL_der based on user inputted values.
#
# Let's say you do not need help preparing meals, you need help getting to
# appointments or errands, you need help doing housework, do not need help
# doing personal care, and do not need help moving inside the house. Using
# adl_fun() we can check if you need help doing tasks
ADL_der <- adl_fun(2, 1, 1, 2, 2)
print(ADL_der)
#> [1] 1