From 640cb428dca7522bcdf6b1e64d6a112deaaf1e74 Mon Sep 17 00:00:00 2001 From: Loic-Lenof <loic.lenof@gmail.com> Date: Thu, 8 Sep 2022 11:05:12 +0200 Subject: [PATCH] Update BBP-click-whistles_3models.R --- Stats/BBP-click-whistles_3models.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Stats/BBP-click-whistles_3models.R b/Stats/BBP-click-whistles_3models.R index 09843c4..d00efb1 100644 --- a/Stats/BBP-click-whistles_3models.R +++ b/Stats/BBP-click-whistles_3models.R @@ -196,10 +196,9 @@ mod.bbp$deviance/mod.bbp$df.residual ### Model for clicks # Using NB model: -mod.cli <- gilm.nb(number_of_clicks ~ acoustic + fishing_net + acoustic:fishing_net + offset(log(number)), +mod.cli <- glm.nb(number_of_clicks ~ acoustic + fishing_net + acoustic:fishing_net + offset(log(number)), data=acoustic.dta) car::Anova(mod.cli, type=3) -shapiro.test(residuals(mod.cli)) # H0 : normality -> cannot be rejected if p > 0.05 dwtest(mod.cli) # H0 -> independent if p>0.05 (autocorrelation if p<0.05) bptest(mod.cli) # H0 -> homoscedasticity if p<0.05 mod.cli$deviance/mod.cli$df.residual -- GitLab