wadpac / GGIR

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

Fragmentation metric CoV not correct #1105

Closed vincentvanhees closed 6 months ago

vincentvanhees commented 6 months ago

I think fragmentation metric CoV is not calculated correctly. https://github.com/wadpac/GGIR/blob/master/R/g.fragmentation.R#L200-201

The article by Blikman states: The third parameter was the variation of bout length (coefficient of variation). This outcome was obtained after dividing the SD by the mean bout length (min) from the lognormal transformed data.

which means that we need to do instead: sd(log(DurationPA)) / mean(log(DurationPA))