markbr_y_wa(dset, TS, col, rstdr, rstfl, TH, wd, nmin, nmax, nvm)The default input values used were found to maximize (sensitivity * specificity) Axis1 data for youths in the study described in Tracy et al. (2014). The default values can be changed to investigator-selected values (e.g. threshold for maximum number of counts). Data in the column with counts (col) could be replaced by vector magnitude (VM) data obtained from triaxial accelerometer. Waist function differs from Wrist function in the defaults for "TH" and "Wakedelta". These functions could process data from accelerometers worn at other locations (e.g. ankle) or other populations (e.g. adults) if appropriate values for "TH" and "Wakedelta" were available.
data(zPhysActBedRest)
## Example 1:
## wa_sj6909_ts = read.csv("wa_sj6909_ts.csv")
wa_sj6909_slp = markbr_y_wa(wa_sj6909_ts)
## Example 2:
## Create a folder in the working director called "marked"
## wa_sl3611_lts = read.csv("wa_sl3611_timestamp.csv")
wa_sl3611_sleep = markbr_y_wa(wa_sl3611_lts,
TS = "tstmp",
col = "cnt",
## rstdr = "marked",
rstfl = "wa_sl3611_bdr_sum",
TH = 25,
wd = 550,
nmin = 60,
nmax = 120,
nvm = 25)
Run the code above in your browser using DataLab