| Title: | Map Activity Data to Normalized Quantiles |
|---|---|
| Description: | Provides functions mapping physical activity measures to normalized quantiles. Currently, only maps the 'NHANES' quantiles, but other quantiles will be integrated. |
| Authors: | John Muschelli [aut, cre] (ORCID: <https://orcid.org/0000-0001-6469-1750>) |
| Maintainer: | John Muschelli <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-10-08 09:48:03 UTC |
| Source: | https://github.com/jhuwit/actiquantiles |
map_nhanes_pa_quantiles() adds a population-level quantile column to a
participant-level data frame. Quantiles are evaluated from NHANES
accelerometer cumulative distribution functions stratified by age category,
sex/gender, measure, and optionally survey wave.
acti_map_nhanes( data, id = NULL, age = "age", sex = "sex", measure = "measure", value = "value", wave = NULL, age_category = NULL, quantile_col = "acti_pa_quantile" )acti_map_nhanes( data, id = NULL, age = "age", sex = "sex", measure = "measure", value = "value", wave = NULL, age_category = NULL, quantile_col = "acti_pa_quantile" )
data |
A data frame with one row per participant-measure observation. |
id |
Optional participant identifier column name. The column is checked when supplied, but otherwise left unchanged. |
age, sex, measure, value
|
Column names in |
wave |
Optional NHANES wave column name or scalar value. Supported values
are |
age_category |
Optional column name containing NHANES age categories
such as |
quantile_col |
Name of the output quantile column. |
data with an added quantile column.
example_data <- data.frame( id = 1:2, age = c(25, 62), sex = c("Female", "Male"), measure = c("mims", "ssl_steps"), value = c(15000, 7500) ) acti_map_nhanes(example_data)example_data <- data.frame( id = 1:2, age = c(25, 62), sex = c("Female", "Male"), measure = c("mims", "ssl_steps"), value = c(15000, 7500) ) acti_map_nhanes(example_data)