score_paq | R Documentation |
This function scores the parent-reported Physical Activity Questionnaire from visit 1 in order to calculate total amount of sedentary to low physical activity (SLPA) and moderate to vigorous physical activity (MVPA) per day and week. Optionally, this will also provide sleep duration per day.
score_paq(paq_data, study = "fbs", sleep = FALSE, parID)
paq_data |
a data.frame all items for the Physical Activity Questionnaire following the naming conventions described above |
study |
a string indicating which study collected the data. Currently, only option and default is 'fbs'. This parameter is included so this script can be adapted for future studies that collect proper continuous data. |
sleep |
(optional) A boolean indicator for whether parent-reported sleep should be estimated for each day and week. Default = FALSE. |
parID |
(optional) name of participant ID column in intake_data. If included the output dataset will be matched by parID, if not included the output dataset will be in the order of intake_data but will have no participant identifier. |
To use this function, the data must be prepared according to the following criteria: 1) The data must include all items related to sleep and activity for all fives days requested (i.e., Monday - Friday) 2) The columns/variables must match the following naming conventions for each day item - 'paq_d_item' where 'd' is the day (i.e., 'm', 't', 'w', 'th', 'f') and item is the scale item. 3) The following scale items must be for each day: 'wakeup', 'indoor_lowintensity', 'indoor_highintensity', 'outdoor_lowintensity', 'outdoor_highintensity', 'bedtime'
Note, as long as variable names match those listed, the dataset can include other variables
A dataset with amount of MVPA calculated for each day and week. If sleep = TRUE, parent-reported sleep will also be included
Harro, M. (1997). Validation of a Questionnaire to Assess Physical Activity of Children Ages 4–8 Years. Research Quarterly for Exercise and Sport, 68(4), 259–268. https://doi.org/10.1080/02701367.1997.10608007 (PubMed)
Raw data from Qualtrics was processed using the following script: util_fbs_parent_v1dat
# physical activity only
mvpa_score <- score_paq(paq_data, parID = 'ID')
# physical activity AND sleep
mvpa_sleep_score <- score_paq(paq_data, sleep = TRUE, parID = 'ID')
## Not run:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.