markPAI {PhysicalActivity}R Documentation

Mark Physical Activity Intensity (PAI) Level

Description

This function adds a physical activity intensity level variable “pai” to the source dataset. The “pai” is an ordered factor variable. It will be NA for nonwear times.

Usage

markPAI(
  data,
  cts = getOption("pa.cts"),
  markingString = "w",
  breaks = c(-Inf, 100, 760, 2020, Inf),
  labels = c("sedentary", "light", "moderate", "vigorous")
)

Arguments

data

Data with classified wear (nonwear) status by wearingMarking.

cts

The name of the counts column. The default is “axis1”.

markingString

Option for summarizing wear (markingString = “w”) or nonwear time (markingString = “nw”).

breaks

A numeric vector of cut-points. The default cut-points are based on Matthews et al. (2016).

labels

A character vector labelling intensity levels.

Value

A data frame with an additional PAI-level column.

Author(s)

Cole Beck cole.beck@vumc.org, Leena Choi leena.choi@Vanderbilt.Edu

References

Matthews CE, Keadle SK, Troiano RP, Kahle L, Koster A, Brychta R, Van Domelen D, Caserotti P, Chen KY, Harris TB, Berrigan D. Accelerometer-measured dose-response for physical activity, sedentary time, and mortality in US adults. Am J Clin Nutr. 2016 Nov;104(5):1424-1432.

Examples

data(dataSec)

mydata1m = dataCollapser(dataSec, TS = "TimeStamp", col = "counts", by = 60)

data1m = wearingMarking(dataset = mydata1m,
                       perMinuteCts = 1,
                       cts = "counts")

markPAI(data = data1m, cts = 'counts')[1:10,]

[Package PhysicalActivity version 0.2-4 Index]