Description Usage Arguments Value Author(s) References Examples
View source: R/McVeighFcn_v5.r
McVeighFcn is used to process minute-level accelerometer data from devices worn over 24 hours with the McVeigh algorithm to identify instances of in-bed versus sleep time. The McVeigh specification for determining non-wear time can be used or a non-wear vector calculated via some other methodology can be input.
1 2 3 4 5 6 7 | McVeighFcn(timevec, cpmvec, nwvec= NULL, rollwin = 30,
slthresh = 88, slperiod = 180, wkperiod = 10,
prslthresh1 = 89, prslthresh2 = 50, prslcount = 4,
prwkthresh1 = 91, prwkthresh2 = 200, prwkcount = 3,
spurthresh = 2.5*60, nwperiod = 90, nwctsgt0 = 3,
nwmaxct = 50, vhighpct = 0.9, highpct = 0.8,
modpct = 0.5,fairtime = 14*60, validday = 10*60)
|
timevec |
vector detailing the time of each observation. Must be minute-level data. The specified format is <e2><80><9c>POSIX<e2><80><9d>. When |
cpmvec |
vector summarizing activity level in cpm at each observation point. Must be same length as |
nwvec |
optional vector specifying non-wear observations. If left as NULL, nonwear observations will be calculated via McVeigh<e2><80><99>s algorithm. |
rollwin |
number of minutes on either side of an observation to be used to calculate moving/rolling average. If the entire size of |
slthresh |
threshold defining low versus high activity. |
slperiod |
consecutive time (in minutes) of rolling average low activity require to define approximate into-bed times. |
wkperiod |
consecutive time (in minutes) of rolling average high activity require to define approximate out-of-bed times. |
prslthresh1 |
threshold for individual cpm measurements when calculating precise into-bed times. |
prslthresh2 |
along with |
prslcount |
threshold for number of cpm observations below |
prwkthresh1 |
threshold for individual cpm measurements when calculating precise out-of-bed times. |
prwkthresh2 |
Along with |
prwkcount |
threshold for number of cpm observations below |
spurthresh |
time in minutes between consecutive in-bed periods used to classify spurious data. When the interval between 2 in-bed periods < |
nwperiod |
length of interval in minutes considered for non-wear calculations. |
nwctsgt0 |
number non-zero measurements within |
nwmaxct |
threshold for maximum value allowed when classifying non-wear intervals. |
vhighpct |
in-bed period with a proportion <e2><89><a5> |
highpct |
in-bed period with a proportion <e2><89><a5> |
modpct |
in-bed period with a proportion <e2><89><a4> |
fairtime |
maximum time allowed for wear in-bed period. |
validday |
number of minutes of waking wear required for a day to be considered valid. |
McVeighFcn returns a data frame with the following variables:
time |
the input |
cpm |
the input |
nw |
either the input |
inbed |
binary variable indicating whether observation is an in-bed observation. |
wakingwear |
binary variable indicating whether observation is a waking wear observation. |
validday |
binary variable indicating whether observation occurred on a valid day. If |
validinbed |
binary variable indicating whether observation is an inbed observation from a valid day. If |
Vincent Berarardi,Assistant Professor, Chapman University, Department of Psychology; John Bellettiere, Post Doctoral Research Fellow, University of California San Diego
McVeigh, J. A., Winkler, E. A., Healy, G. N., Slater, J., Eastwood, P. R., & Straker, L. M. (2016). Validity of an automated algorithm to identify waking and in-bed wear time in hip-worn accelerometer data collected with a 24 h wear protocol in young adults. Physiological Measurement, 37(10), 1636.
1 2 3 4 5 6 7 8 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x)
{
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.