I'm working with a zero-inflated dataset (confirmed using
vcdExtra::zero.test) of bat calls per unit time (i.e. bat activity), which I'm relating to the occurrence of passenger trains passing the recording site.
To assess the effect of passing trains, I compared the number of bat calls in the 30 seconds before, after and between train passes using a zero-inflated negative binomial mixed model (
glmmTMB package) with the structure:
glmmTMB(bat call rate ~ category + (1|site), ziformula = ~., family = nbinom2)
category is either before, after or between, and
(1|site) accounts for repeated measures at each location.
This showed the number of bat calls was lower in the after category (i.e. there was less activity in the 30 seconds after a train passed).
To examine if the reduction in calls lasts longer than 30 seconds, I re-ran the model comparing bat call rates from time intervals of increasing duration - 60/120/240 seconds - divided into the same before, after and between train categories. And,
category was no longer significant in any of these models.
All intervals between trains are ≥ 90 seconds in duration, with frequency decreasing as duration increases. This means sample size reduced sequentially from 3000 in the initial 30 second model, to 1800 in the 60 second model, 1000 in the 120 second model, and 500 in the 240 second model.
I'd like to determine whether the lack of relationship in the 60/120/240 seconds models is because there is only a reduction in bat calls for 30 seconds, or is due to their lower sample sizes.
I assume (perhaps naively) I could do this by comparing the effect size for the 30 seconds model with the power of the 60/120/240 seconds models. But, I'm not sure how to calculate these values (it's my first time using zero-inflated models).
According to Johnson et al. (2015), it is possible, but there's no information in the paper about how to do it, and
GLMMmisc::sim.glmm doesn't seem to work with
Any advice, or ideas for alternative approaches would be greatly appreciated!