Code for non-wear detection

30 views
Skip to first unread message

Khadija Zanna

unread,
May 13, 2024, 11:54:44 AMMay 13
to R package GGIR
Hello,

I was wondering if I cna be pointed to the part in the GGIR code where non-wear is calculated or detected. The description on the c-ran website mentions that: "Accelerometer non-wear time is detected on the basis of statistics derived from a rolling time window. A step in time is classified as non-wear if both of the following criteria are met for at least two out of the three accelerometer axes:
  • The standard deviation of the accelerations is less than accelerometer brand specific reference values, which for most brands is 13.0 mg ()
  • The range of accelerations (i.e., maximum value minus minimum value) is less than 50 mg.

The size of the rolling time window and the size of the steps it takes in time are defined by argument windowsizes, a vector with length three. More specifically, the second value (mediumsize window, default = 15 min) and the third value (longsize window, default = 60 min) are used.

How it then labels the data depends on the non-wear approach taken as discussed below, and specified with argumentnonwear_approach. At the moment there are two approaches to detect non-wear: nonwear_approach = "2013" andnonwear_approach = "2023"."

I am looking for where this is done specifically in the code.


Thank you.

Michael Rueschman

unread,
May 14, 2024, 10:23:54 AMMay 14
to R package GGIR
You can search through the GGIR codebase here: https://github.com/wadpac/GGIR

This appears to be an important file in nonwear detection: https://github.com/wadpac/GGIR/blob/master/R/detect_nonwear_clipping.R

Reply all
Reply to author
Forward
0 new messages