On a defini nos sites par des mailles de 10kmx10km sur l’ensemble de la Bretagne. On a retire les sites dont l’aire est strictement inferieure a \(10 km^2\). On obtient ainsi 317 sites au total.
VariablesSite%>%
ggplot()+geom_sf()+labs(title = "Sites utilises pour nos analyses")
On a fait des regressions lineaires avec la proportion de l’espece sur un site chaque annee \(t\) en question, en lien avec d’autres especes. On a inclus diverses variables telles que :
Nous avons utilise le BIC pour choisir le modele optimal. Cependant, bien que la plupart des resultats etaient coherents avec ce que l’on peut observer, les modeles ne semblaient pas valider les hypotheses necessaires aux GLM (residus et differents tests).
De plus, comme nous utilisons une espece temoin, cela peut affecter le modele. Nous sommes donc passes a des modeles d’occupancy.
Nous avons teste differents modeles d’occupancy sur plusieurs especes. Celles qui nous ont le plus interessees sont :
Selon la bibliographie, les especes moins frequemment observees donnent de meilleurs resultats avec des periodes plus longues. Nous avons donc separe les especes soit en 5 periodes de 3 ans, soit en 3 periodes de 5 ans. Dans ce cas, le putois, l’hermine et la fouine sont les especes les moins facilement detectables qui aurons des periodes plus longues sur cette analyse.
Nous utilisons les memes variables d’environnement que pour les GLM, auxquelles nous ajoutons la variable pression d’observation, qui prend en compte le nombre d’observations autres que l’espece etudiee, par site et par annee.
quali_periodes_matrice_5 <-
matrix(c('2010 - 2012', '2013 - 2015',
'2016 - 2018', '2019-2021', '2022 - 2024'),
nrow = 317,
ncol = 5,
byrow = TRUE)
quanti_periodes_matrice_5 <- matrix(
1:5,
nrow=317,
ncol=5,
byrow=TRUE)
quali_periodes_matrice_3 <-
matrix(c('2010 - 2014','2015 - 2019', '2020 - 2024'),
nrow = 317,
ncol = 3,
byrow = TRUE)
quanti_periodes_matrice_3 <- matrix(
1:3,
nrow=317,
ncol=3,
byrow=TRUE)
site_covs_periodes_5 <- list(
quanti_periodes = quanti_periodes_matrice_5,
quali_periodes = quali_periodes_matrice_5
)
site_covs_periodes_3 <- list(
quanti_periodes = quanti_periodes_matrice_3,
quali_periodes = quali_periodes_matrice_3
)
detection_matrice <- matrice_occu_detections(num_cd_nom = 60981)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
On observe de plus en plus de sites ou le sanglier est present :
plot(umf,
main="Detection/non detection de sanglier sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
## 20 41 45 32 59 38 51 53 73 71 94 90 116 114 120
pression_obs <- pression_obs_bdd(num_cd_nom = 60981)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs ),
yearlySiteCovs = site_covs_periodes_5,
numPrimary = 5
)
## Warning: yearlySiteCovs contains characters. Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ X_10km + Dnst_Cultures, # initial occupancy
gammaformula = ~ 1, # colonization
epsilonformula = ~ 1, # extinction
pformula = ~ pression_obs, # detection
data = umf, # data
control = list(trace = 1),
se = TRUE)
## initial value 2390.684310
## iter 10 value 2145.390365
## final value 2136.211784
## converged
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~X_10km + Dnst_Cultures, gammaformula = ~1,
## epsilonformula = ~1, pformula = ~pression_obs, data = umf,
## se = TRUE, control = list(trace = 1))
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) -0.502 0.165 -3.04 0.00237
## X_10km 0.549 0.186 2.95 0.00314
## Dnst_Cultures -0.447 0.181 -2.47 0.01356
##
## Colonization (logit-scale):
## Estimate SE z P(>|z|)
## -0.211 0.143 -1.48 0.14
##
## Extinction (logit-scale):
## Estimate SE z P(>|z|)
## -2.59 0.347 -7.46 8.34e-14
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) -0.839 0.0576 -14.6 3.84e-48
## pression_obs 0.968 0.0664 14.6 3.26e-48
##
## AIC: 4286.424
## Number of sites: 317
backTransform(fm, "col"); confint(backTransform(fm, "col"))
## Backtransformed linear combination(s) of Colonization estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.447 0.0354 -0.211 1
##
## Transformation: logistic
## 0.025 0.975
## 0.3793836 0.5173123
backTransform(fm, "ext"); confint(backTransform(fm, "ext"))
## Backtransformed linear combination(s) of Extinction estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.07 0.0226 -2.59 1
##
## Transformation: logistic
## 0.025 0.975
## 0.03675048 0.1292391
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call:
## parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B)
## 1 4320 -437 56
## Pr(t_B > t0)
## 1 0.976
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4594 4652 4738 4760 4786 4862 4885
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 5
##
## Chi-square statistic:
## Season 1 Season 2 Season 3 Season 4 Season 5
## 20.8830 28.0490 17.8019 17.0955 76.2160
##
## Total chi-square = 160.0453
## Number of bootstrap samples = 5
## P-value = 0
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 22 27 28 33 39
##
## Estimate of c-hat = 5.4
graphiques :
plot <- proba_graphique_5(fm, couleur=couleur_sanglier)
plot +
labs(title = "Probabilite d'occupation du sanglier a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_5(fm=fm, couleur=couleur_sanglier)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence du sanglier"))
detection_matrice <- matrice_occu_detections(num_cd_nom = 60585)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
plot(umf,
main="Detection/non detection du renard sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018
## 144 211 232 213 231 188 200 186 200
## 2019 2020 2021 2022 2023 2024
## 191 167 175 189 199 208
pression_obs <- pression_obs_bdd(num_cd_nom = 60585)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs ),
yearlySiteCovs = site_covs_periodes_5,
numPrimary = 5
)
## Warning: yearlySiteCovs contains characters.
## Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ 1, # initial occupancy
gammaformula = ~ quali_periodes, # colonization
epsilonformula = ~ quali_periodes, # extinction
pformula = ~ pression_obs, # detection
data = umf, # data
se = TRUE)
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~1, gammaformula = ~quali_periodes,
## epsilonformula = ~quali_periodes, pformula = ~pression_obs,
## data = umf, se = TRUE)
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## 3.3 0.545 6.06 1.34e-09
##
## Colonization (logit-scale):
## Estimate SE z
## (Intercept) -0.912 1.75 -0.521
## quali_periodes2013 - 2015 0.304 2.39 0.127
## quali_periodes2016 - 2018 0.879 1.86 0.473
## quali_periodes2019-2021 3.625 3.31 1.097
## P(>|z|)
## (Intercept) 0.603
## quali_periodes2013 - 2015 0.899
## quali_periodes2016 - 2018 0.636
## quali_periodes2019-2021 0.273
##
## Extinction (logit-scale):
## Estimate SE z
## (Intercept) -9.48 23 -0.413
## quali_periodes2013 - 2015 6.76 23 0.294
## quali_periodes2016 - 2018 6.10 23 0.265
## quali_periodes2019-2021 5.04 23 0.219
## P(>|z|)
## (Intercept) 0.680
## quali_periodes2013 - 2015 0.769
## quali_periodes2016 - 2018 0.791
## quali_periodes2019-2021 0.826
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 0.981 0.0465 21.1 7.80e-99
## pression_obs 2.015 0.0981 20.5 9.59e-94
##
## AIC: 5353.951
## Number of sites: 317
## Warning: Large or missing SE values. Be very
## cautious using these results.
confint((fm_quali)[2])
## 0.025 0.975
## col(Int) -17.053560 4.321383
## col(quali_periodes) -1.317121 5.484448
confint((fm_quali)[3])
## 0.025 0.975
## ext(Int) -4.9522790 -2.387292
## ext(quali_periodes) -0.5206872 0.455967
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call: parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
## 1 4531 -223 131 0.927
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4458 4527 4657 4773 4840 4973 5028
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 5
##
## Chi-square statistic:
## Season 1 Season 2 Season 3 Season 4 Season 5
## 94.2300 35.2578 20.6775 21.1882 6.4377
##
## Total chi-square = 177.7913
## Number of bootstrap samples = 5
## P-value = 0
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 25 27 34 40 40
##
## Estimate of c-hat = 5.33
graphiques :
plot <- proba_graphique_5(fm = fm, couleur=couleur_renard)
plot +
labs(title = "Probabilite d'occupation du renard a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_5(fm=fm, couleur=couleur_renard)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence du renard",
size = 16,
face = "bold"))
detection_matrice <- matrice_occu_detections(num_cd_nom = 61714)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
plot(umf,
main="Detection/non detection de lapins sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
## 95 165 179 158 166 123 140 134 147 143 158 153 152 143 122
pression_obs <- pression_obs_bdd(num_cd_nom = 61714)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs),
yearlySiteCovs = site_covs_periodes_5,
numPrimary = 5
)
## Warning: yearlySiteCovs contains characters. Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ Dnst_Cultures + Dist_Littoral, # initial occupancy
gammaformula = ~ 1, # colonization
epsilonformula = ~ 1, # extinction
pformula = ~ pression_obs, # detection
data = umf, # data
control = list(trace = 1),
se = TRUE)
## initial value 3425.577086
## iter 10 value 2843.994209
## iter 20 value 2831.433615
## final value 2831.401974
## converged
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~Dnst_Cultures + Dist_Littoral,
## gammaformula = ~1, epsilonformula = ~1, pformula = ~pression_obs,
## data = umf, se = TRUE, control = list(trace = 1))
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 2.787 0.488 5.71 1.14e-08
## Dnst_Cultures -0.805 0.366 -2.20 2.76e-02
## Dist_Littoral -0.582 0.276 -2.11 3.47e-02
##
## Colonization (logit-scale):
## Estimate SE z P(>|z|)
## -0.464 0.274 -1.69 0.0906
##
## Extinction (logit-scale):
## Estimate SE z P(>|z|)
## -2.59 0.224 -11.6 6.01e-31
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 0.179 0.0434 4.13 3.70e-05
## pression_obs 1.306 0.0720 18.14 1.57e-73
##
## AIC: 5676.804
## Number of sites: 317
backTransform(fm, "col"); confint(backTransform(fm, "col"))
## Backtransformed linear combination(s) of Colonization estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.386 0.065 -0.464 1
##
## Transformation: logistic
## 0.025 0.975
## 0.2684845 0.5183448
backTransform(fm, "ext"); confint(backTransform(fm, "ext"))
## Backtransformed linear combination(s) of Extinction estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.0699 0.0145 -2.59 1
##
## Transformation: logistic
## 0.025 0.975
## 0.04625461 0.1043954
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call: parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
## 1 4396 -365 73.9 0.976
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4640 4654 4727 4757 4792 4879 5089
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 5
##
## Chi-square statistic:
## Season 1 Season 2 Season 3 Season 4 Season 5
## 73.5792 22.4731 35.0807 27.6131 25.9791
##
## Total chi-square = 184.7253
## Number of bootstrap samples = 5
## P-value = 0
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 18 24 27 27 41
##
## Estimate of c-hat = 6.71
graphiques :
plot <- proba_graphique_5(fm, couleur=couleur_lapin)
plot +
labs(title = "Probabilite d'occupation du lapin a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_5(fm=fm, couleur=couleur_lapin)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence du lapin"))
detection_matrice <- matrice_occu_detections(num_cd_nom = 60015)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
plot(umf,
main="Detection/non detection de herissons sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
## 133 211 211 205 203 145 149 168 200 225 222 232 230 215 221
pression_obs <- pression_obs_bdd(num_cd_nom = 60015)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs ),
yearlySiteCovs = site_covs_periodes_5,
numPrimary = 5
)
## Warning: yearlySiteCovs contains characters. Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ X_10km + Dist_EcotoneArbore, # initial occupancy
gammaformula = ~ 1, # colonization
epsilonformula = ~ 1, # extinction
pformula = ~ pression_obs, # detection
data = umf, # data
control = list(trace = 1),
se = TRUE)
## initial value 3911.163718
## iter 10 value 2753.439426
## iter 20 value 2749.593939
## final value 2749.578230
## converged
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~X_10km + Dist_EcotoneArbore, gammaformula = ~1,
## epsilonformula = ~1, pformula = ~pression_obs, data = umf,
## se = TRUE, control = list(trace = 1))
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 5.06 1.271 3.98 6.82e-05
## X_10km -3.14 0.921 -3.41 6.52e-04
## Dist_EcotoneArbore -1.43 0.409 -3.49 4.89e-04
##
## Colonization (logit-scale):
## Estimate SE z P(>|z|)
## 0.626 0.27 2.32 0.0203
##
## Extinction (logit-scale):
## Estimate SE z P(>|z|)
## -3.01 0.22 -13.7 8.81e-43
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 0.955 0.0432 22.1 3.67e-108
## pression_obs 1.467 0.0878 16.7 1.00e-62
##
## AIC: 5513.156
## Number of sites: 317
backTransform(fm, "col"); confint(backTransform(fm, "col"))
## Backtransformed linear combination(s) of Colonization estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.652 0.0613 0.626 1
##
## Transformation: logistic
## 0.025 0.975
## 0.52429 0.7604752
backTransform(fm, "ext"); confint(backTransform(fm, "ext"))
## Backtransformed linear combination(s) of Extinction estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.047 0.00983 -3.01 1
##
## Transformation: logistic
## 0.025 0.975
## 0.03107151 0.07047576
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call: parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
## 1 4477 -280 86.1 0.976
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4638 4638 4702 4755 4790 4931 5087
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 5
##
## Chi-square statistic:
## Season 1 Season 2 Season 3 Season 4 Season 5
## 93.9007 52.8810 54.4485 42.5554 40.4452
##
## Total chi-square = 284.2308
## Number of bootstrap samples = 5
## P-value = 0
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 20 26 30 36 38
##
## Estimate of c-hat = 9.5
graphiques :
plot <- proba_graphique_5(fm=fm, couleur=couleur_herisson)
plot +
labs(title = "Probabilite d'occupation du herisson a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_5(fm=fm, couleur=couleur_herisson)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence du herisson"))
detection_matrice <- matrice_occu_detections(num_cd_nom = 60731)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
plot(umf,
main="Detection/non detection de putois sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
## 25 34 38 29 40 26 34 18 39 32 36 35 74 48 38
pression_obs <- pression_obs_bdd(num_cd_nom = 60731)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs ),
yearlySiteCovs = site_covs_periodes_3,
numPrimary = 3
)
## Warning: yearlySiteCovs contains characters. Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ X_10km + Y_10km, # initial occupancy
gammaformula = ~ 1, # colonization
epsilonformula = ~ 1, # extinction
pformula = ~ scale(pression_obs), # detection
data = umf, # data
control = list(trace = 1),
se = TRUE)
## initial value 1930.619934
## iter 10 value 1602.245765
## iter 20 value 1588.803335
## final value 1587.051627
## converged
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~X_10km + Y_10km, gammaformula = ~1,
## epsilonformula = ~1, pformula = ~scale(pression_obs), data = umf,
## se = TRUE, control = list(trace = 1))
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 0.590 0.256 2.31 0.02100
## X_10km -0.659 0.253 -2.60 0.00921
## Y_10km 0.306 0.195 1.56 0.11777
##
## Colonization (logit-scale):
## Estimate SE z P(>|z|)
## -0.439 0.29 -1.51 0.13
##
## Extinction (logit-scale):
## Estimate SE z P(>|z|)
## -2.25 0.568 -3.97 7.21e-05
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) -1.705 0.0788 -21.65 6.47e-104
## scale(pression_obs) 0.514 0.0556 9.25 2.28e-20
##
## AIC: 3188.103
## Number of sites: 317
backTransform(fm, "col"); confint(backTransform(fm, "col"))
## Backtransformed linear combination(s) of Colonization estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.392 0.0691 -0.439 1
##
## Transformation: logistic
## 0.025 0.975
## 0.2674496 0.5322228
backTransform(fm, "ext"); confint(backTransform(fm, "ext"))
## Backtransformed linear combination(s) of Extinction estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.0951 0.0488 -2.25 1
##
## Transformation: logistic
## 0.025 0.975
## 0.03340381 0.2422444
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call: parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
## 1 4526 -240 38 0.976
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4693 4695 4736 4767 4792 4837 4851
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 3
##
## Chi-square statistic:
## Season 1 Season 2 Season 3
## 113.4182 32.9396 76.9479
##
## Total chi-square = 223.3057
## Number of bootstrap samples = 5
## P-value = 0
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 68 85 86 89 92
##
## Estimate of c-hat = 2.66
graphiques :
plot <- proba_graphique_3(fm=fm, couleur=couleur_putois)
plot +
labs(title = "Probabilite d'occupation du putois a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_3(fm=fm, couleur=couleur_putois)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence du putois"))
detection_matrice <- matrice_occu_detections(num_cd_nom = 60686)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
plot(umf,
main="Detection/non detection de l'hermine sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
## 7 8 16 7 6 4 11 3 6 4 3 4 1 7 6
pression_obs <- pression_obs_bdd(num_cd_nom = 60686)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs ),
yearlySiteCovs = site_covs_periodes_3,
numPrimary = 3
)
## Warning: yearlySiteCovs contains characters. Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ Y_10km + Dist_Eau, # initial occupancy
gammaformula = ~ 1, # colonization
epsilonformula = ~ 1, # extinction
pformula = ~ pression_obs, # detection
data = umf, # data
control = list(trace = 1),
se = TRUE)
## initial value 927.122264
## iter 10 value 440.205225
## iter 20 value 438.137291
## iter 30 value 437.916192
## final value 437.915215
## converged
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~Y_10km + Dist_Eau, gammaformula = ~1,
## epsilonformula = ~1, pformula = ~pression_obs, data = umf,
## se = TRUE, control = list(trace = 1))
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 0.237 0.430 0.55 0.582457
## Y_10km 1.274 0.381 3.34 0.000834
## Dist_Eau -0.870 0.395 -2.20 0.027615
##
## Colonization (logit-scale):
## Estimate SE z P(>|z|)
## -7.72 22.1 -0.349 0.727
##
## Extinction (logit-scale):
## Estimate SE z P(>|z|)
## -1.11 0.48 -2.31 0.021
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) -3.055 0.1889 -16.17 7.90e-59
## pression_obs 0.205 0.0997 2.05 4.02e-02
##
## AIC: 889.8304
## Number of sites: 317
## Warning: Large or missing SE values. Be very cautious using these results.
backTransform(fm, "col"); confint(backTransform(fm, "col"))
## Backtransformed linear combination(s) of Colonization estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.000443 0.00979 -7.72 1
##
## Transformation: logistic
## 0.025 0.975
## 6.843246e-23 1
backTransform(fm, "ext"); confint(backTransform(fm, "ext"))
## Backtransformed linear combination(s) of Extinction estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.248 0.0896 -1.11 1
##
## Transformation: logistic
## 0.025 0.975
## 0.1141156 0.4583408
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call: parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
## 1 4391 -220 262 0.732
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4007 4144 4419 4604 4798 5077 5283
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 3
##
## Chi-square statistic:
## Season 1 Season 2 Season 3
## 87.6708 11.2945 9.4118
##
## Total chi-square = 108.3771
## Number of bootstrap samples = 5
## P-value = 0
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 27 27 36 40 99
##
## Estimate of c-hat = 2.36
graphiques :
plot <- proba_graphique_3(fm=fm, couleur=couleur_hermine)
plot +
labs(title = "Probabilite d'occupation de l'hermine a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_3(fm=fm, couleur=couleur_hermine)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence de l'hermine"))
detection_matrice <- matrice_occu_detections(num_cd_nom = 60674)
umf <- unmarkedFrameOccu(y = detection_matrice,
siteCovs = site_info)
plot(umf,
main="Detection/non detection de la fouine sur les sites de 2010 a 2024 inclus")
print(colSums(detection_matrice))
## 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
## 31 44 52 39 42 33 38 36 46 43 50 44 51 39 42
pression_obs <- pression_obs_bdd(num_cd_nom = 60674)
umf <- unmarked::unmarkedMultFrame(
y = detection_matrice,
siteCovs = site_info,
obsCovs = list(pression_obs = pression_obs ),
yearlySiteCovs = site_covs_periodes_3,
numPrimary = 3
)
## Warning: yearlySiteCovs contains characters. Converting them to factors.
fm <- unmarked::colext(
psiformula = ~ Dist_EcotoneArbore + Dist_Littoral, # initial occupancy
gammaformula = ~ 1, # colonization
epsilonformula = ~ 1, # extinction
pformula = ~ pression_obs, # detection
data = umf, # data
control = list(trace = 1),
se = TRUE)
## initial value 2046.004684
## iter 10 value 1735.651232
## iter 20 value 1729.323410
## final value 1729.323255
## converged
coefficients :
fm
##
## Call:
## unmarked::colext(psiformula = ~Dist_EcotoneArbore + Dist_Littoral,
## gammaformula = ~1, epsilonformula = ~1, pformula = ~pression_obs,
## data = umf, se = TRUE, control = list(trace = 1))
##
## Initial (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) 0.602 0.207 2.91 0.00359
## Dist_EcotoneArbore -0.524 0.196 -2.67 0.00758
## Dist_Littoral -0.358 0.178 -2.01 0.04481
##
## Colonization (logit-scale):
## Estimate SE z P(>|z|)
## -0.641 0.276 -2.32 0.0203
##
## Extinction (logit-scale):
## Estimate SE z P(>|z|)
## -2.22 0.489 -4.55 5.4e-06
##
## Detection (logit-scale):
## Estimate SE z P(>|z|)
## (Intercept) -1.515 0.0704 -21.52 9.22e-103
## pression_obs 0.535 0.0557 9.61 7.21e-22
##
## AIC: 3472.647
## Number of sites: 317
backTransform(fm, "col"); confint(backTransform(fm, "col"))
## Backtransformed linear combination(s) of Colonization estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.345 0.0624 -0.641 1
##
## Transformation: logistic
## 0.025 0.975
## 0.2345676 0.4750792
backTransform(fm, "ext"); confint(backTransform(fm, "ext"))
## Backtransformed linear combination(s) of Extinction estimate(s)
##
## Estimate SE LinComb (Intercept)
## 0.0977 0.0431 -2.22 1
##
## Transformation: logistic
## 0.025 0.975
## 0.03987518 0.2200715
tests :
pb <- parboot(fm, statistic=chisq, nsim=40, parallel=FALSE)
pb
##
## Call: parboot(object = fm, statistic = chisq, nsim = 40, parallel = FALSE)
##
## Parametric Bootstrap Statistics:
## t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
## 1 4566 -190 34 0.976
##
## t_B quantiles:
## 0% 2.5% 25% 50% 75% 97.5% 100%
## [1,] 4674 4709 4733 4749 4780 4824 4837
##
## t0 = Original statistic computed from data
## t_B = Vector of bootstrap samples
AICcmodavg::mb.gof.test(fm)
##
## Goodness-of-fit for dynamic occupancy model
##
## Number of seasons: 3
##
## Chi-square statistic:
## Season 1 Season 2 Season 3
## 33.5619 34.8895 31.2344
##
## Total chi-square = 99.6858
## Number of bootstrap samples = 5
## P-value = 0.4
##
## Quantiles of bootstrapped statistics:
## 0% 25% 50% 75% 100%
## 81 89 95 112 127
##
## Estimate of c-hat = 0.99
graphiques :
plot <- proba_graphique_3(fm=fm, couleur=couleur_fouine)
plot +
labs(title = "Probabilite d'occupation de la fouine a travers les saisons",
x = "Saisons", y ="Probabilite d'occupation lisee")
plot <- carte_graphique_3(fm=fm, couleur=couleur_fouine)
ggpubr::annotate_figure(plot,
top = ggpubr::text_grob("Presence de la fouine"))