wadpac / GGIR

Code corresponding to R package GGIR
https://wadpac.github.io/GGIR/
Apache License 2.0
94 stars 60 forks source link

Change default for parameter minloadcrit #1101

Closed vincentvanhees closed 5 months ago

vincentvanhees commented 5 months ago

Parameter minloadcrit is the minimum number of hours used for the auto-calibration routine as implemented in 2013/2014. I set it to 72 hours back in 2013 as a compromise between trying to get good calibration coefficients and not having to load the entire file.

Motivation for changing the default:

  1. We know that in theory more data offers a better model.
  2. In release 3.0-6 a 'bug' was fixed which was that temperature (if available) was used from the entire recording while coefficients were only derived from the first 3 days. This meant that the temperature was not optimally used. The bug fix means that we now consistently use only data from the first 72 hours, which seems to be suboptimal for some recordings as we see that ENMO values are on average a bit higher now than before.
  3. All file reading functions have become a lot faster over the years it is no longer critical to load only a small fraction of the file.

What new default to use? I explored today how calibration error, MAD and ENMO metric values change with increasing value of minloadcrit in a sample of 20 GENEActiv files:

For 10 day recordings:

image

For a 7 day recording:

image

Observations:

Proposal: Based on the above plots it seems that changing the default value for minloadcrit to 168 hours (7 days) seems sufficient to improve the ENMO values.