2024-07-04
Dividimos el año en periodos de 90 dias alrededor de los puntos de mayor o menor luminosidad (solsticios y equinoccios)
This distribution is described by a mean direction φ (q) and concentration parameter κ, which are analogous to the mean μ and reciprocal of the variance 1/σ2 of the normal distribution, respectively. The Rayleigh test compares the likelihood of the data assuming a uniform von Mises distribution (κ=0) with the likelihood assuming a non-uniform von Mises distribution (κ>0). Rao test is the extension for non uniformal or multimodal, test unformity against non uniformity
## ## Rayleigh Test of Uniformity ## General Unimodal Alternative ## ## Test Statistic: 0.387 ## P-value: 0
## ## Rao's Spacing Test of Uniformity ## ## Test Statistic = 290.8537 ## P-value < 0.001 ##
Los resultados sugieren que la distribucion no tienen uniformidad (siguen direccion especificas) y el test de Rao que tiene mas de una. Vamos a modelar para ver si una o varias direcciones especificas tienen mas sentidos
Vamos a testear que modelos explican mejor lo que observamos utilizando la propuesta de: https://journals.biologists.com/jeb/article/220/21/3878/33774/Bringing-the-analysis-of-animal-orientation-data
| Model | params | q1 | k1 | lamda | q2 | k2 | Likelihood | AIC | AICc | BIC |
|---|---|---|---|---|---|---|---|---|---|---|
| M5B | 5 | 4.823 | 1.900 | 0.535 | 2.740 | 3.921 | 513.356 | 1036.7 | 1036.9 | 1055.677 |
| M5A | 4 | 4.948 | 2.682 | 0.453 | 2.821 | 2.682 | 514.582 | 1037.2 | 1037.3 | 1052.336 |
| M2A | 2 | 3.701 | 0.840 | 1.000 | - | 0.000 | 551.683 | 1107.4 | 1107.4 | 1114.952 |
| M2C | 3 | 3.607 | 1.043 | 0.750 | - | 0.000 | 557.334 | 1120.7 | 1120.7 | 1132.047 |
| M2B | 2 | 3.539 | 1.275 | 0.500 | - | 0.000 | 565.538 | 1135.1 | 1135.1 | 1142.662 |
| M3B | 3 | 3.371 | 1.183 | 0.500 | 6.512 | 0.001 | 566.525 | 1139.0 | 1139.1 | 1150.429 |
| M4B | 4 | 2.795 | 7.089 | 0.258 | 5.936 | 0.001 | 570.607 | 1149.2 | 1149.3 | 1164.386 |
| M4A | 3 | 3.125 | 1.015 | 0.749 | 6.267 | 1.015 | 575.694 | 1157.4 | 1157.5 | 1168.767 |
| M3A | 2 | 2.393 | 1.624 | 0.500 | 5.535 | 1.624 | 585.311 | 1174.6 | 1174.7 | 1182.207 |
| M1 | 0 | - | 0.000 | 1.000 | - | 0.000 | 602.824 | 1205.6 | 1205.6 | 1205.647 |
El modelo M5B tiene lamejor perfomance descriptiva sobre los datos El modelo se llama bimodal, sugiere que hay dos modas y esas modas pueden tener diferencias de magnitud significativas entre ellas. Entonces el parametro q y el k de cada uno serian:
## q1 k1 q2 k2 ## M5B 18.4225 7.257465 10.46603 14.97712
Ploteamos el resultado
dataset_agt$time<-sapply(dataset_agt$hour, convert_to_decimal) dataset_agt %>% select(23:38) %>% summarise_all(sum)
## gatillante estres coito valsalva llanto tos defecar agacharse levantar_peso ## 1 193 68 35 43 2 NA 15 5 1 ## ejercicio vomitos inmersion_agua_fria inmersion_agua_caliente viaje_largo ## 1 35 4 1 23 5 ## medicacion no_filiado ## 1 2 117
# seleccion: estres, coito, agua caliente, no filiado
## Triggers patron temporal
A named 4-element vector: obs = observed overlap index; null = mean null overlap index; seNull = standard error of the null distribution; pNull = probability observed index arose by chance. m1: coito, m2: estres, m3: baño caliente
compareCkern(m1,m2,reps=100)
## obs null seNull pNull ## 0.8803483 0.8317050 0.0466317 0.9100000
compareCkern(m1,m3,reps=100)
## obs null seNull pNull ## 0.77385289 0.79154120 0.06240732 0.34000000
compareCkern(m2,m3,reps=100)
## obs null seNull pNull ## 0.74110182 0.78609026 0.05845287 0.21000000
## Patron temporal circadiano - deteccion modal
## ## Rao's Spacing Test of Uniformity ## ## Test Statistic = 259.0506 ## P-value < 0.001 ##
## ## Watson's Test for Circular Uniformity ## ## Test Statistic: 1.8901 ## P-value < 0.01 ##
A named 4-element vector: obs = observed overlap index; null = mean null overlap index; seNull = standard error of the null distribution; pNull = probability observed index arose by chance. m1: invierno, m2: primavera/otoño, m3: verano
compareCkern(m1,m2,reps=100)
## obs null seNull pNull ## 0.8406299 0.8638275 0.0272460 0.2100000
compareCkern(m1,m3,reps=100)
## obs null seNull pNull ## 0.80212918 0.86567117 0.03866086 0.07000000
compareCkern(m2,m3,reps=100)
## obs null seNull pNull ## 0.88859238 0.90693224 0.02844375 0.25000000
| Model | params | q1 | k1 | lamda | q2 | k2 | Likelihood | AIC | AICc | BIC |
|---|---|---|---|---|---|---|---|---|---|---|
| M5B | 5 | 5.177 | 1.068 | 0.572 | 2.806 | 3.170 | 846.109 | 1702.2 | 1702.3 | 1723.232 |
| M5A | 4 | 2.951 | 1.823 | 0.592 | 5.443 | 1.823 | 847.987 | 1704.0 | 1704.1 | 1720.784 |
| M3B | 3 | 2.814 | 2.229 | 0.500 | 5.956 | 0.902 | 873.304 | 1752.6 | 1752.7 | 1765.215 |
| M4A | 3 | 5.999 | 1.516 | 0.362 | 9.140 | 1.516 | 873.702 | 1753.4 | 1753.5 | 1766.011 |
| M4B | 4 | 5.943 | 0.772 | 0.541 | 9.085 | 2.526 | 873.271 | 1754.5 | 1754.6 | 1771.352 |
| M2A | 2 | 3.676 | 0.506 | 1.000 | - | 0.000 | 877.701 | 1759.4 | 1759.4 | 1767.806 |
| M2C | 3 | 2.898 | 4.273 | 0.251 | - | 0.000 | 877.919 | 1761.8 | 1761.9 | 1774.445 |
| M2B | 2 | 3.419 | 1.026 | 0.500 | - | 0.000 | 880.189 | 1764.4 | 1764.4 | 1772.783 |
| M3A | 2 | 2.694 | 1.572 | 0.500 | 5.835 | 1.572 | 882.710 | 1769.4 | 1769.4 | 1777.825 |
| M1 | 0 | - | 0.000 | 1.000 | - | 0.000 | 907.911 | 1815.8 | 1815.8 | 1815.823 |
## q1 k1 q2 k2 ## M5B 19.77468 4.07946 10.71813 12.10851
Ploteamos el resultado