intensities {accelerometry} | R Documentation |
Physical Activity Intensities
Description
Given a vector of accelerometer count values, calculates time spent in 5
mutually exclusive user-defined intensity levels (typically representing
sedentary, light, lifestyle, moderate, and vigorous) as well as the total
counts accumulated in various intensities. Non-wear time should be removed
from counts
before calling intensities
to avoid overestimating
sedentary time.
Usage
intensities(counts, int_cuts = as.integer(c(100, 760, 2020, 5999)))
Arguments
counts |
Integer vector with accelerometer count values. |
int_cuts |
Numeric vector with four cutpoints from which five intensity
ranges are derived. For example, |
Value
Integer vector of length 16 in which the first eight values are minutes in intensities 1, 2, 3, 4, 5, 2-3, 4-5, and 2-5, and the next eight are counts accumulated during time spent in each of those intensities.
Examples
# Load accelerometer data for first 5 participants in NHANES 2003-2004
data(unidata)
# Get data from ID number 21005
counts.part1 <- unidata[unidata[, "seqn"] == 21005, "paxinten"]
# Create vector of counts during valid wear time only
counts.part1.wear <- counts.part1[weartime(counts = counts.part1) == 1]
# Calculate physical activity intensity variables
intensity.variables <- intensities(counts = counts.part1.wear)