# How to interprete the p values of cos and sin terms in periodic regression?

I have camera trap data where for each site and hour I have the abundance of wild herbivores. I want to create a model where I can estimate the effect of predator activity on the activity and behavior of these herbivores.

Looking at the kernel density of all the data (see figure), there is clear periodicity (24 hour) in activity with drops during dawn and dusk (predator avoidance). There is also a subtle drop during the hottest period of the day which is related to resting. There's a lot of zero's (as with any camera trap study) so Ive included a zero inflation formula.

Im quite new to periodic regression, but if I understand it correctly I should include a 'fundamental'period of 24 hours, and optionally some harmonics to modulate the signal.

The following model is one of the best models (based on AIC):

model <- glmmTMB(Abundance ~
cos(hour*2*pi/24) + sin(hour*2*pi/24) +
cos(2*hour*2*pi/24) + sin(2*hour*2*pi/24)

+(1|site)

,ziformula = ~1,

family = nbinom2,
data = wb)


The graph with the predicted values looks as follows:

It kind of resembles the kernel density, so I feel that it should be ok BUT the p values of the sinus terms are not significant (in all the models that I considered). Also, the zero inflation part is not significant.

The output for the above model:

Family: nbinom2  ( log )
Formula:          Abundance ~ cos(hour * 2 * pi/24) + sin(hour * 2 * pi/24) + cos(2 *
hour * 2 * pi/24) + sin(2 * hour * 2 * pi/24) + (1 | site)
Zero inflation:             ~1
Data: wb

AIC      BIC   logLik deviance df.resid
3024.3   3072.4  -1504.1   3008.3     3016

Random effects:

Conditional model:
Groups Name        Variance Std.Dev.
site   (Intercept) 0.1461   0.3823
Number of obs: 3024, groups:  site, 6

Overdispersion parameter for nbinom2 family (): 0.0765

Conditional model:
Estimate Std. Error z value Pr(>|z|)
(Intercept)               -1.50487    0.17534  -8.583  < 2e-16 ***
cos(hour * 2 * pi/24)     -0.85531    0.11930  -7.169 7.53e-13 ***
sin(hour * 2 * pi/24)      0.10085    0.11358   0.888  0.37458
cos(2 * hour * 2 * pi/24) -0.29770    0.10491  -2.838  0.00454 **
sin(2 * hour * 2 * pi/24) -0.02808    0.12349  -0.227  0.82013
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Zero-inflation model:
Estimate Std. Error z value Pr(>|z|)
(Intercept)   -16.56    2659.26  -0.006    0.995


My specific questions:

• Is it a problem that the sinus predictor is not significant? Should I drop it and just keep the cos predictor? why?

• How do I interprete the non significant p value for the zero inflation part?