Skip to content

Commit

Permalink
create new branch that can be merged with master
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentvanhees committed May 6, 2024
1 parent b759083 commit 5185b22
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/articles/chapter0_contributing.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 66 additions & 3 deletions docs/articles/chapter4_AccMetrics.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pandoc: 3.1.11
pkgdown: 2.0.9
pkgdown_sha: ~
articles:
chapter0_contributing: chapter0_contributing.html
chapter0_Contributing: chapter0_Contributing.html
chapter0_GetStarted: chapter0_GetStarted.html
chapter0_Installation: chapter0_Installation.html
chapter0_Support: chapter0_Support.html
Expand All @@ -24,5 +24,5 @@ articles:
HouseHoldCoanalysis: HouseHoldCoanalysis.html
readmyacccsv: readmyacccsv.html
TutorialDaySegmentAnalyses: TutorialDaySegmentAnalyses.html
last_built: 2024-05-06T13:46Z
last_built: 2024-05-06T13:57Z

2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

38 changes: 35 additions & 3 deletions vignettes/chapter4_AccMetrics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ GGIR(do.enmo = TRUE, do.mad = TRUE, do.bfen = TRUE, …)
| bfx | Band-pass filtered x-axis | Average | do.bfx | Frequency |
| bfy | Band-pass filtered y-axis | Average | do.bfy | Frequency |
| bfen | Euclidean norm of the band-pass filtered signals | Average | do.bfz | Frequency |
| zcx | Zero crossing count x-axis | Sum | do.zcx | Frequency |
| zcy | Zero crossing count y-axis | Sum | do.zcy | Frequency |
| zcz | Zero crossing count z-axis | Sum | do.zcz | Frequency |
| zcx | Zero crossing count x-axis (see notes below) | Sum | do.zcx | Frequency |
| zcy | Zero crossing count y-axis (see notes below) | Sum | do.zcy | Frequency |
| zcz | Zero crossing count z-axis (see notes below) | Sum | do.zcz | Frequency |
| neishabouricounts | Counts as described by [Neishabouri et al. 2022](https://doi.org/10.1038/s41598-022-16003-x) as used in the ActiLife software for raw ActiGraph data | Sum | do.neishabouricounts | Frequency |

### Approach to removing the gravitational signal component
Expand Down Expand Up @@ -152,6 +152,38 @@ Studies who have criticised ENMO consistently failed to apply auto-calibration,
It needs free-living data to work properly.
Further, studies are often not clear about how the problematic zero imputation during the idle sleep mode in ActiGraph devices is dealt with.


### Notes on implementation of zero crossing counts

The implementation of the zero-crossing count in GGIR is an attempt to imitat the zero-crossed counts as described by Sadeh, Cole, Kripke and colleagues in late 1980s and 1990s. However, it cannot be guaranteed to be an exact copy of the original approach, which used the AMA-32 Motionlogger Actigraph by Ambulatory-monitoring Inc. ("AMI").

No complete publicly accessible description of that approach exists.

#### Missing information

The missing information about the calculation is:

1. Sadeh specified that calculations were done on data from the Y-axis but the direction of the Y-axis was not clarified. Therefore, it is unclear whether the Y-axis at the time corresponds to the Y-axis of modern sensors
2. A frequency filter was used, but properties of the filter are missing
3. Sensitivity of the sensor, we are now guessing that the Motionlogger had a sensitivity of 0.01 _g_ but without direct proof.
4. Relationship between piezo-electric acceleration signal used at the time and modern piezo-capacitive acceleration signals.

From personal correspondence with AMI, we learnt that the technique has been kept proprietary and has never been shared with or sold to other actigraphy manufacturers (time of correspondence October 2021). Based on the correspondence with AMI we can conclude that even Actiwatch, ActiGraph and other manufacturers who have facilitated the use of 1990s sleep classification algorithms cannot guarantee exact replication of the original studies.

#### Our guess on the missing information

Following the above challenges the implementation of the zero-crossing count in GGIR is based on an educated guess where we used all information we could find in literature and product documentation. In relation to the missing information listed above:

1. We allow you to specify which axis you want to use with parameter `Sadeh_axis` but choose as default the second axis.
2. We use a 0.25 - 3 Hertz band-pass filter with order 2, which you can modify with parameters `zc.lb`, `zc.hb`, and `zc.order`.
3. We use a 0.01 _g_ stop band, which you can change with parameter `zc.sb`.
4. We assume that the band-passed signal is comparable in the absence of evidence on the contrary.

In our own evaluation the zero-crossing count value range looks plausible when compared to the value range in the original publications.

As a note to ActiGraph users: If you decide to compare GGIR Cole-Kripke estimates with ActiLife Cole Kripke estimate be aware that ActiLife may have adopted a different Cole-Kripke algorithm as the original publication presented four algorithms, by which that could also be a source of variation. Further, ActiLife may have used different educated guesses about how Motionlogger counts are calculated.


## Embedding your own metrics

Some GGIR users may like to use a metric not covered by GGIR.
Expand Down

0 comments on commit 5185b22

Please sign in to comment.