How to Create New Variables to Describe Leisure-Time Physical Activity
Study participants aged 12 years and older were asked to indicate whether they performed moderate and/or vigorous leisure-time activities at intervals of 10 minutes or more over the 30 days preceding the interview. These data are found in the PAQ dataset. Data on specific activities, frequency, and duration are found in the PAQIAF dataset.
For the PAQMSTR.sas program, we will calculate Moderate Leisure-Time MET minutes per week (MOD_LTMMPW) and Vigorous Leisure-Time MET minutes per Week (VIG_LTMMPW). We also will create Moderate Leisure-Time minutes per week (MOD_LTMINW) and Vigorous Leisure-Time minutes per Week (VIG_LTMINW).
PAQ Variables and Program Notes
* PAD320: Moderate activity over past 30 days (1 = Yes, 2 = No)
* PAD200: Vigorous activity over past 30 days (1 = Yes, 2 = No)
PAQIAF Variables and Program Notes
* PADMETS: MET score for activity
* PADTIMES: Number of times did activity in past 30 days
* PADDURAT: Average duration of activity in minutes
* PADLEVEL: Activity level (1 = Moderate; 2 = Vigorous)
The table below includes segments of code from the PAQMSTR.sas program.
Program Description | SAS Code |
---|---|
Leisure-time activity is reported by month. Calculate moderate and vigorous minutes and MET minutes of activity by month. We will later calculate the corresponding weekly activity. Initialize intermediate variables to ‘0’. | *monthly calculation of moderate and vigorous leisure-time activities;
MOD_LTMINM = 0 ; |
Study participants may report multiple activities, which have pre-assigned MET scores. For each level of activity (moderate or vigorous), multiply the frequency and duration to get a monthly sum of minutes of activity. Next, multiply the MET value of the activity against the minutes per month to get MET minutes per month for the given activity. | *moderate activities; *vigorous activities; ; |
For each study participant, sum the leisure-time minutes per month and the leisure-time MET minutes by combining these values for each of their leisure-time activities. Set these variables in the temporary ‘byid’ dataset. | data = paqiaf noprint ; |
Convert monthly summaries to weekly summaries. Use 4.33 as the average number of weeks in a month. |
*change per month to per week; MOD_LTMINW = MOD_LTMINM/4.33 ; *Sum leisure activity based on moderate + vigorous; LTMINW = MOD_LTMINW + VIG_LTMINW; *Label newly created variables; label MOD_LTMMPW = 'Moderate Leisure-Time MET min/wk' |