ropensci / GLMMcosinor

An R package for flexible cosinor modelling using the glmmTMB framework
https://docs.ropensci.org/GLMMcosinor/
GNU General Public License v3.0
1 stars 0 forks source link

[Bug fix] test_cosinor miscalculating differences #7

Closed oliverjayasinghe closed 7 months ago

oliverjayasinghe commented 10 months ago

In the test_cosinor() function, the difference between acrophases should account for periodicity. For example, acrophases of -pi and pi are the same, but the raw absolute difference is 2*pi. This means that when comparing two acrophases in the previous version of test_cosinor(), the true differences may have been overestimated.

To address this, test_cosinor() now determines the minimum absolute difference of two acrophase estimates which is used to generate the p-values and confidence intervals for the difference between the the two estimates.