This function creates a derived variable for daily leisure energy expenditure.A MET is a conceptual value that represents energy expended during physical activity. The volume of activity is calculated by multiplying the amount of minutes of activity (by level of intensity) by the MET value associated with that intensity. A MET (metabolic equivalent) is the energy cost of activity expressed as kilocalories expended per kilogram of body weight per hour of activity.

In CCHS 2001-2014, PACDEE is the variable used to determine the daily expenditure of leisure activity for all ages. In CCHS 2015-2018, ages 12-17 and 18+ years old have separate activity variables, where 12-17 year olds use PAY_XXX and 18+ year olds use PAA_XXX. Leisure activity is not directly measured. We used the derived variable, PAADVVOL, and removed active transportation in the new function. With this function, we combined leisure activity for ages 12+. We calculate the daily energy expenditure which uses the frequency and duration per session of the physical activity as well as the MET value (3 METS for leisure and 6 METS for vigorous activity).

EE (Daily Energy Expenditure) = ((N X D X METvalue) / 60)/7 Where: N = the number of times a respondent engaged in an activity over a 7 day period D = the average duration in minutes of the activity MET value = the energy cost of the activity expressed as kilocalories expended per kilogram of body weight per hour of activity (kcal/kg per hour)

energy_exp_fun( DHHGAGE_cont, PAA_045, PAA_050, PAA_075, PAA_080, PAADVDYS, PAADVVIG, PAYDVTOA, PAYDVADL, PAYDVVIG, PAYDVDYS )

DHHGAGE_cont | continuous age variable. |
---|---|

PAA_045 | number of hours of sports, fitness, or recreational activity that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old. |

PAA_050 | number of minutes of sports, fitness, or recreational activity that make you sweat or breathe harder for CCHS 2015-2018 for 18+ years old. |

PAA_075 | number of hours of other physical activity while at work, home or volunteering for CCHS 2015-2018 for 18+ years old. |

PAA_080 | number of minutes of other physical activity while at work, home or volunteering for CCHS 2015-2018 for 18+ years old. |

PAADVDYS | number of active days - 7 day for CCHS 2015-2018 for 18+ years old. |

PAADVVIG | number of minutes of vigorous activity over 7 days or CCHS 2015-2018 for 18+ years old. |

PAYDVTOA | total minutes of other activities - 7 day for CCHS 2015-2018 for 12-17 years old. |

PAYDVADL | total minutes of physical activity - leisure - 7 day for CCHS 2015-2018 for 12-17 years old. |

PAYDVVIG | total minutes - vigorous physical activity - 7 d for CCHS 2015-2018 for 12-17 years old. |

PAYDVDYS | total days physically active - 7 day for CCHS 2015-2018 for 12-17 years old. |

Continuous variable for energy expenditure (energy_exp)

# Using energy_exp_fun() to create energy expenditure values across CCHS # cycles # energy_exp_fun() is specified in variable_details.csv along with the CCHS # variables and cycles included. # To transform energy_exp across cycles, use rec_with_table() for each # CCHS cycle and specify energy_exp, along with each activity variable. # Then by using merge_rec_data(), you can combine energy_exp across # cycles library(cchsflow) energy_exp2015_2016 <- rec_with_table( cchs2015_2016_p, c( "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp" ) )#>#>#>#>#>#> DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVDYS PAADVVIG PAYDVADL #> 1 62 0 0 0 0 0 0 NA #> 2 42 1 20 1 0 4 70 NA #> 3 16 NA NA NA NA NA NA 570 #> 4 57 22 45 8 0 7 0 NA #> 5 47 3 0 0 0 2 0 NA #> 6 62 3 30 2 0 7 0 NA #> PAYDVDYS PAYDVTOA PAYDVVIG energy_exp #> 1 NA NA NA 0.000000 #> 2 NA NA NA 6.000000 #> 3 NA 0 NA NA #> 4 NA NA NA 92.250000 #> 5 NA NA NA 2.571429 #> 6 NA NA NA 16.500000energy_exp2017_2018 <- rec_with_table( cchs2017_2018_p, c( "DHHGAGE_cont", "PAA_045", "PAA_050", "PAA_075", "PAA_080", "PAADVDYS", "PAADVVIG", "PAYDVTOA", "PAYDVADL", "PAYDVVIG", "PAYDVDYS", "energy_exp" ) )#>#>#>#>#>#> DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVDYS PAADVVIG PAYDVADL #> 195 62 0 0 0 0 0 0 NA #> 196 67 0 0 4 0 3 0 NA #> 197 85 0 0 0 0 7 0 NA #> 198 47 6 0 10 0 7 0 NA #> 199 52 3 0 0 0 3 0 NA #> 200 47 0 0 0 0 0 0 NA #> PAYDVDYS PAYDVTOA PAYDVVIG energy_exp #> 195 NA NA NA 0.000000 #> 196 NA NA NA 5.142857 #> 197 NA NA NA 0.000000 #> 198 NA NA NA 48.000000 #> 199 NA NA NA 3.857143 #> 200 NA NA NA 0.000000combined_energy_exp <- suppressWarnings(merge_rec_data(energy_exp2015_2016, energy_exp2017_2018)) head(combined_energy_exp)#> DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVDYS PAADVVIG PAYDVADL #> 1 62 0 0 0 0 0 0 NA #> 2 42 1 20 1 0 4 70 NA #> 3 16 NA NA NA NA NA NA 570 #> 4 57 22 45 8 0 7 0 NA #> 5 47 3 0 0 0 2 0 NA #> 6 62 3 30 2 0 7 0 NA #> PAYDVDYS PAYDVTOA PAYDVVIG energy_exp #> 1 NA NA NA 0.000000 #> 2 NA NA NA 6.000000 #> 3 NA 0 NA NA #> 4 NA NA NA 92.250000 #> 5 NA NA NA 2.571429 #> 6 NA NA NA 16.500000#> DHHGAGE_cont PAA_045 PAA_050 PAA_075 PAA_080 PAADVDYS PAADVVIG PAYDVADL #> 395 32 0 0 3 30 7 60 NA #> 396 47 7 30 1 0 6 55 NA #> 397 13 NA NA NA NA NA NA 0 #> 398 32 0 0 4 0 7 0 NA #> 399 42 0 0 5 0 5 0 NA #> 400 57 0 0 54 0 7 150 NA #> PAYDVDYS PAYDVTOA PAYDVVIG energy_exp #> 395 NA NA NA 13.50000 #> 396 NA NA NA 24.21429 #> 397 7 0 0 0.00000 #> 398 NA NA NA 12.00000 #> 399 NA NA NA 10.71429 #> 400 NA NA NA 169.50000