In this blog post I will talk you through the main updates in the new GGIR 2.8-0 release. For a full list of updates since the previous CRAN release (version 2.7-1), see the GGIR changelog.
Time gap handling in ActiGraph .gt3x data format and ad-hoc csv-file formats
As discussed in previous GGIR update ActiGraph .gt3x data can come with time gaps as a result of the idle sleep mode mechanism. The handling of these time gaps has now been improved. In addition to various bug fixes, time gaps lasting more than 90 minutes are now dealt with at epoch (metric) level rather than at raw data level to improve memory management.
A special thanks to Dr. Jairo Hidalgo Migueles for this help with getting this work.
Speed increase GENEActiv .bin data
A new function has been written to read GENEActiv binary data approximately two times faster than before. This function has been included in a new R package named GGIRread, which is called from within GGIR. To facilitate direct comparison between new and old functionality I added the GGIR argument loadGENEActiv
, which when set to “GENEAread” will use the R package GENEAread, and when set to “GGIRread” (default) will use GGIRread. Eventually this option will be deprecated, so if you have GENEActiv data then please help monitor that both options provide consistent output.
This update has been made possible with help form Dr. Patrick Bos, freelance data scientist.
Speed increase in estimation of orientation angles
The calculation of the rolling median on the raw time series has been one of the most time intensive steps of GGIR part 1. I have now modified this calculation to only extract the rolling median from a 10 Hertz version of the signal. My justification for this change is that angle information is only reliable during non-movement conditions with movement frequencies near zero, by which frequencies above 5 Hertz are unlikely to make a meaningful difference anyway.
Improved facilitation of multi-timezone studies
For the data types GENEActiv .bin and ActiGraph .gt3x, GGIR now also facilitates specifying the timezone were the accelerometer was configured in addition to where it was worn. Note that this was already possible for Axivity .cwa before. We have not looked yet into facilitating this for other brands or data formats. Please contact us if you think this would be of value and/or if you see opportunities to fund such a development.
Vignettes
- The main GGIR package vignette has had a section with guidance on the use of physical activity intensity cut-points. This section has now been expanded and migrated to a new vignette including look up tables, see Published cut-points and how to use them in GGIR.
- The documentation for all GGIR input arguments has been expanded with default values as centrally stored in the load_params function. Further, the arguments are now also displayed in a new vignette page named GGIR configuration parameters (html) in addition to the default GGIR package reference manual (pdf). Rather than copy-pasting the documentation, GGIR automatically generates the documentation to ensure it is consistent between html and pdf.
This update has been made possible thanks to a lot of hard work form Dr. Jairo Hidalgo Migueles.
Cole-Kripke algorithm
The Cole-Kripke sleep detection has been implemented and vignette text on sleep analysis has been expanded accordingly.
This new functionality has been developed in collaboration with Prof. Dr. Uher’s group at the Department of Psychiatry, Dalhousie University, Halifax, Canada
GGIR part 2 pdf
The pdf visualization in the results/QC
output folder has been part of GGIR since the early days but has undergone relatively little updates over the years. The visualization has now been enhanced with a legend and improvements to the layout.
Improved facilitation of longitudinal studies on sleep
In the sleep assessment (part 4), person level aggregation now takes place per filename instead of per recording ID, which should prevent that identical IDs in repeated recordings in the same study get treated as a single recording. Also ID matching between accelerometer file name and sleep log ID column has been improved by ignore space characters. Here, the assumption is that a space is never a defining character in a participant ID.
GGIR part 5 can now include last incomplete day (use with caution!)
You may have noticed that GGIR does not include the last recording day in the part5 output if the recording ends before midnight. This is done because lack of clarity about sleep onset makes it impossible to say anything meaningful about the balance between waking and sleeping hours.
However, there is one scenario where you may argue that this is too stringent: Studies based in populations assumed to fall asleep before or shortly after the end of the recording, such as maybe children. To facilitate this specific scenario it is now possible to tell GGIR to add artificial data to the end of the recording in order to trigger a dummy sleep analysis for the last non-existing night of data and by that generate part 5 output on time-use. You can do this with argument expand_tail_max_hours
. For example, setting expand_tail_max_hours = 3
will cause the last day of recordings that end after 9pm to be included if the rest of the day meets the non-wear criteria. Note that the synthetic sleep estimates for the last day are skipped in the part 4 and part 5 reports. All GGIR relies on is the users’ belief that the participant fell asleep before or shortly after the end of the recording.
Needless to say that this argument should be used with high caution as it can easily bias your results.
The addition of this feature was sponsored by University Medicine Greifswald, German Center für Cardiovascular Research (DZHK), site Greifswald, Germany.
Movisens
GGIR now also extracts recording ID from Movisens data, and can handle Movisens temperature values expressed in Fahrenheit.
Activity diary
- The user is now warned when the date format is inconsistent across the diary.
- Missing values in activity diary are now skipped by which non-neighboring cells with valid data can form new day segments. So, for example it is now possible to segment the day for one person in three and for another person in five.
- Activity diary used to treat empty cells as missing values, but now also does that for cells with only a dot in them.
This work has been sponsored by Dr. Beets and the Arnold Childhood Obesity Initiative Research Group at the University of South Carolina.
OSx arm64
Fixed timezone sensitivity for OSx in Pacific time zone, which prohibited the CRAN release 2.7-0 and 2.7-1 for this architecture.
This bug was fixed with help from Dr. Taren Sanders based at the Australian Catholic University
Version out-of-date notification
When loading GGIR library(GGIR)
you will receive an R console notification if your GGIR version is behind the CRAN version. In that way I hope to encourage users to use the latest version whenever possible. I understand that this is not always desirable, which is why it is a notification only that you are free to ignore.