Open ReinderVosDeWael opened 1 week ago
For the default threshold values I'm assuming those were in mg when you gave them to me?
Yeah, what you have matches what I have (but I do have another version that has 3 values for light, two each for moderate and vigorous). Also, MVPA threshold is it's own thing at 0.125 g
We should have a discussion about the whole bout thing. I feel like it is added complexity, perhaps it is something to add later and not for the ADHD summer camp?
To me the simplest implementation is: calculate enmo in 5-second (seems to be a well accepted standard) epochs, calculate which category a given epoch is a member of (inactivity, light, moderate, vigorous). Return that measurement.
Then we can count/analyze however we see fit (i.e group per day, and then sum the number of bins in each category per day, per hour, or per week, etc.)
GGIR website mentions as one of the things that can't be changed: "Order in which bouts are calculated (1 MVPA; 2 inactive; 3 Light)". This struck me as odd, and probably is a result of some idiosyncrasy of their implementation which we shouldn't replicate ?
I also was confused by why the order was a problem.
I believe that the physical activity metrics are calculated in these functions (potentially, these specific sections): https://github.com/wadpac/GGIR/blob/master/R/g.analyse.R https://github.com/wadpac/GGIR/blob/master/R/g.getM5L5.R https://github.com/wadpac/GGIR/blob/9ae4851aca4338ee804a2bddb9e5d5e8dda6855a/R/g.analyse.perday.R#L536
Description
Analysis of time spent at varying levels of physical activity is a powerful and common tool in physical activity research. Wristpy will be able to take acceleration data in user defined epochs and categorized those epochs as either inactive, Light Physical Activity(LIPA), Moderate Physical Activity, or Vigorous Physical Activity (Moderate and Vigorous are often taken together as MVPA). It will then be able to detect bouts of sustained activity at those activity levels.
Tasks
[ ] Implement ENMO thresholding. Classify each epoch into different activity levels. Activity levels should be: Inactivity, Light Physical Activity (LIPA), and Moderate to Vigorous Physical Activity (MVPA).
[ ] Bout Detection: The function should then be able to identify periods of continuous activity(bouts). at every activity level.
[ ] Returns: ? See third note.
Freeform Notes
No response