summaryData function

Summarize Classified Wear Time by Daily Basis

Summarize Classified Wear Time by Daily Basis

This function summarizes accelerometer data and the classified wear or nonwear time by daily basis.

summaryData( data, validCut = getOption("pa.validCut"), perMinuteCts = 1, markingString = "w", TS = getOption("pa.timeStamp"), cts = getOption("pa.cts"), delivery = NULL, deliveryCut = 0.5 )

Arguments

  • data: Data with classified wear (nonwear) status by wearingMarking.
  • validCut: A cutoff for the total minutes of classified monitor wear time per day to be considered as a valid monitor day.
  • perMinuteCts: The number of data rows per minute. The default is 1-min epoch (perMinuteCts = 1) and we recommend to use 1-min epoch data for this summary. For examples: for data with 10-sec epoch, set perMinuteCts = 6; for data with 1-sec epoch, set perMinuteCts = 60.
  • markingString: Option for summarizing wear (markingString = w ) or nonwear time (markingString = nw ).
  • TS: The column name for timestamp. The default is TimeStamp .
  • cts: The name of the counts column. The default is axis1 .
  • delivery: data.frame. Delivery information created by markDelivery or deliveryPrediction.
  • deliveryCut: A cutoff (probability) to consider a valid delivery date. See the deliveryPrediction function. The default value is 0.5.

Returns

  • unit: epoch for data.

  • totalNumDays: the total number of days in accelerometer data.

  • totalNumWeekWeekend: the total number of weekdays and weekend days in accelerometer data.

  • validCut: a user defined cutoff for the total minutes of classified monitor wear time per day to be considered as a valid monitor day.

  • totalValidNumDays: the total number of valid days based on the user defined cutoff (validCut ) for the total minutes of wear time and the classified wear time.

  • totalValidNumWeekWeekend: the total number of valid weekdays and valid weekend days based on the user defined cutoff (validCut ) for the total minutes of classified monitor wear time per day.

  • wearTimeByDay: the classified total wear (nonwear) time by day.

  • deliveryDays: marked delivery days.

  • validWearTimeByDay: the classified total wear (nonwear) time by valid day.

  • meanWeartimeValidDays: the mean wear (nonwear) time for valid days during weekdays and weekends.

  • meanWeartimeOverallValidDays: the mean wear (nonwear) time for overall valid days.

  • dayInfo: information about wear time and mean counts for each day.

  • intensity: optional output depending on pai column in the data; the total time in hours of physical activity intensity by day.

  • meanValidIntensity: optional output depending on pai column in the data; the mean physical activity intensity (PAI) level for valid days.

Details

This function summarizes the total number of days, weekdays and weekend days in accelerometer data. It provides the total number of valid days, valid weekdays and valid weekend days based on a user defined cutoff for the total minutes of classified monitor wear time per day. This function also summarizes the classified wear (nonwear) time by day and by valid day, and the mean wear (nonwear) time for valid days during weekday and weekends, and for overall valid days. If mail delivery days are classified by markDelivery, it also summarizes the classified delivery (non-delivery) days with argument delivery . If pai column is present in the data, which can be created by markPAI, then physical activity intensity (PAI) level will be summarized in the output.

Examples

data(dataSec) mydata1m = dataCollapser(dataSec, TS = "TimeStamp", col = "counts", by = 60) data1m = wearingMarking(dataset = mydata1m, frame = 90, perMinuteCts = 1, TS = "TimeStamp", cts = "counts", streamFrame = NULL, allowanceFrame= 2, newcolname = "wearing") summaryData(data=data1m, validCut=600, perMinuteCts=1, markingString = "w", cts = "counts") data(deliveryData) options(pa.cts = "vm") wm <- wearingMarking(dataset = deliveryData) dd <- markDelivery(wm) pdd <- deliveryPred(wm) summaryData(wm, delivery = dd) summaryData(wm, delivery = pdd) pai.data <- markPAI(data = wm) dd <- markDelivery(pai.data) summaryData(pai.data, delivery = dd)

References

Choi L, Liu Z, Matthews CE, Buchowski MS. Validation of accelerometer wear and nonwear time classification algorithm. Med Sci Sports Exerc. 2011 Feb;43(2):357-64.

See Also

wearingMarking, sumVct, markPAI, markDelivery

Author(s)

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

  • Maintainer: Leena Choi
  • License: GPL (>= 3)
  • Last published: 2021-01-22

Useful links