Usage
accel.process.tri(counts.tri, steps = NULL, nci.methods = FALSE,
start.date = as.Date("2014/1/5"), start.time = "00:00:00", id = NULL,
brevity = 1, valid.days = 1, valid.week.days = 0,
valid.weekend.days = 0, int.axis = "vert",
int.cuts = c(100, 760, 2020, 5999), cpm.nci = FALSE,
hourly.axis = "vert", days.distinct = FALSE, nonwear.axis = "vert",
nonwear.window = 60, nonwear.tol = 0, nonwear.tol.upper = 99,
nonwear.nci = FALSE, weartime.minimum = 600, weartime.maximum = 1440,
partialday.minimum = 1440, active.bout.length = 10,
active.bout.tol = 0, mvpa.bout.tol.lower = 0, vig.bout.tol.lower = 0,
active.bout.nci = FALSE, sed.bout.tol = 0,
sed.bout.tol.maximum = int.cuts[2] - 1, artifact.axis = "vert",
artifact.thresh = 25000, artifact.action = 1, weekday.weekend = FALSE,
return.form = 2)
Arguments
counts.tri
Three-column accelerometer counts matrix or data frame, where columns 1-3 represent vertical, anteroposterior (AP), and mediolateral (ML) counts, respectively.
steps
Steps vector. If specified, must be same length as counts.tri.
nci.methods
If TRUE, inputs are set to replicate the data processing methods used by the NCI's SAS programs [1]. More specifically:
valid.days = 4; valid.week.days = 0; valid.weekend.days = 0; int.axis = "vert"; int.cuts = c(100, 760, 2020, 5999); cpm.nci = TRUE;
start.date
Date of first day of monitoring (must be of class 'date'). Only used to extract day of week, so if day of week is known but date is not, user can enter any date that corresponds to that day of the week. The default date corresponds to the first Sunday in
start.time
Optional character vector indicating the start time for monitoring. If not specified it is assumed to be 00:00:00, i.e. the very beginning of the first day.
id
Either a single value or a vector indicating the ID number for the participant whose accelerometer data was entered.
brevity
Controls the number of physical activity variables returned. If 1, returns basic indicators of physical activity volume; if 2, also returns indicators of activity intensities, activity bouts, sedentary behavior, and peak activity; if 3, also returns hourl
valid.days
Minimum number of valid days to be considered valid for analysis.
valid.week.days
Minimum number of valid weekdays to be considered valid for analysis.
valid.weekend.days
Minimum number of valid weekend days to be considered valid for analysis.
int.axis
Axis that should be used to classify intensities. Should be one of "vert", "ap", "ml", "sum" (for triaxial sum), or "mag" (for triaxial vector magnitude).
int.cuts
Vector of four cut-points from which five intensity ranges are derived using the accelerometer axis specified by int.axis. For example, if int.axis = "vert" and thresh = c(100, 760, 2020, 5999), minutes with 0-99 vertical axis counts are classified as int
cpm.nci
If TRUE, average counts per minute is calculated by dividing average daily counts by average daily weartime, as opposed to averaging each day's counts per minute value. In general, leave as FALSE unless you want to replicate the NCI's SAS programs [1].
hourly.axis
Axis that should be used for hourly counts per minute variables. Should be one of "vert", "ap", "ml", "sum" (for triaxial sum), or "mag" (for triaxial vector magnitude).
days.distinct
If TRUE, treat each day of data as distinct, i.e. identify non-wear time and activity bouts in day 1, then day 2, etc.; If FALSE, apply algorithms on continuous basis for full monitoring period. If protocol has participants remove accelerometer for sleep,
nonwear.axis
Axis that should be used for non-wear algorithm. Should be one of "vert", "ap", "ml", "sum" (for triaxial sum), or "mag" (for triaxial vector magnitude).
nonwear.window
Minimum length of a non-wear interval.
nonwear.tol
Number of minutes with non-zero counts allowed during a non-wear interval.
nonwear.tol.upper
Maximum count value for a minute with non-zero counts during a non-wear interval.
nonwear.nci
If TRUE, use non-wear algorithm from the NCI's SAS programs [1]; if FALSE, use regular algorithm (see Details).
weartime.minimum
Minimum number of wear time minutes for a day of monitoring to be considered valid.
weartime.maximum
Maximum number of wear time minutes for a day of monitoring to be considered valid.
partialday.minimum
Minimum number of minutes for a partial day of monitoring to be processed and potentially considered valid for analysis (generally applies only to the first and last days of monitoring, which may not cover full 24-hour periods). This input is included bec
active.bout.length
Minimum length of moderate-to-vigorous physical activity (MVPA) and vigorous physical activity (VPA) bouts.
active.bout.tol
Number of minutes with counts below the required intensity level allowed during MVPA and VPA bouts.
mvpa.bout.tol.lower
Lower cut-off for count values outside of MVPA intensity range during an MVPA bout.
vig.bout.tol.lower
Lower cut-off for count values outside of VPA intensity range during a VPA bout.
active.bout.nci
If TRUE, use activity bouts algorithm from the NCI's SAS programs [1]; if FALSE, use regular algorithm (see Details).
sed.bout.tol
Number of minutes with counts outside sedentary range allowed during sedentary bouts.
sed.bout.tol.maximum
Upper cut-off for count values outside sedentary range during a sedentary bout.
artifact.axis
Axis that should be used to detect artifacts. Should be one of "vert", "ap", "ml", "sum" (for triaxial sum), or "mag" (for triaxial vector magnitude).
artifact.thresh
Lower cut-off for counts that are abnormally high and should be considered artifacts.
artifact.action
If 1, exclude days that have one or more artifacts; if 2, consider artifacts as non-wear time; if 3, replace artifacts with average of neighboring count values (for all axes of minutes identified as artifacts); if 4, take no action.
weekday.weekend
If TRUE, function computes physical activity averages for weekdays and weekend days separately (in addition to daily averages for all valid days, which are computed regardless). If FALSE, function only computes averages for all valid days.
return.form
If 1, function returns physical activity variables on per-person basis, i.e. daily averages for each participant; if 2, function returns variables on per-day basis; if 3, function returns both via a list.