This is a derived categorical age variable (DHHGAGE_C) that groups various age categories across all CCHS cycles. This is based on the continuous age variable (DHHGAGE_cont) that is harmonious across all CCHS cycles.
The categories of this new age variable are as follows:
12 to 14 years
15 to 17 years
18 to 19 years
20 to 24 years
25 to 29 years
30 to 34 years
35 to 39 years
40 to 44 years
45 to 49 years
50 to 54 years
55 to 59 years
60 to 64 years
65 to 69 years
70 to 74 years
75 to 79 years
80 years or more
age_cat_fun(DHHGAGE_cont)
DHHGAGE_cont | continuous age variable |
---|
a categorical age variable (DHHGAGE_C)
The categories in the grouped age variable (DHHGAGE) vary between CCHS cycles. As such, a continuous age variable (DHHGAGE_cont) was created that harmonized age across all CCHS cycles by taking the midpoint of each age category. This new age variable (DHHGAGE_C) categorizes age based on the categories used in CCHS cycles from 2007 to 2014.
# Using age_cat_fun() to create categorical age values from DHHGAGE_cont # age_cat_fun() is specified in variable_details.csv along with the CCHS # variables and cycles included. # To generate DHHGAGE_C in a cycle, use rec_with_table() and specify # DHHGAGE_C along with DHHGAGE_cont. library(cchsflow) cat_age2009_2010 <- rec_with_table( cchs2009_2010_p, c( "DHHGAGE_cont", "DHHGAGE_C" ) )#>#>#>