Skip to content
Snippets Groups Projects
Commit a67c1b7d authored by thierrychambert's avatar thierrychambert
Browse files

Cleaned "trend" option

Set Env. Variance at 8% ==> SD ~28%
parent db4a9d5f
No related branches found
No related tags found
No related merge requests found
......@@ -1134,24 +1134,24 @@ server <- function(input, output, session){
if(input$pop_trend == "growth") {
if(input$pop_trend_strength == "weak") {
param$pop_growth_mean <- 1.01
param$pop_growth_mean <- growth_weak
} else if(input$pop_trend_strength == "average"){
param$pop_growth_mean <- 1.03
param$pop_growth_mean <- growth_average
} else {
param$pop_growth_mean <- 1.06
param$pop_growth_mean <- growth_strong
}
} else if(input$pop_trend == "decline"){
if(input$pop_trend_strength == "weak") {
param$pop_growth_mean <- 0.99
param$pop_growth_mean <- decline_weak
} else if(input$pop_trend_strength == "average"){
param$pop_growth_mean <- 0.97
param$pop_growth_mean <- decline_average
} else {
param$pop_growth_mean <- 0.94
param$pop_growth_mean <- decline_strong
}
} else {
param$pop_growth_mean <- 1
param$pop_growth_mean <- pop_stable
}
param$pop_growth_se <- 0
param$pop_growth_se <- trend_se
# Case 3 : Values directly provided (i.e., not from expert elicitation)
......@@ -1237,9 +1237,8 @@ server <- function(input, output, session){
rMAX_species <- rMAX_spp(surv = tail(param$survivals,1), afr = min(which(param$fecundities != 0)))
param$rMAX_species <- rMAX_species
## We define theta = 1 for simplicity - given large uncertainty of real shape of density-dependence in nature
#param$theta <- theta_spp(rMAX_species)
param$theta <- fixed_theta
#param$theta <- theta_spp(rMAX_species)
param$vr_calibrated <- calibrate_params(
inits = init_calib(s = param$survivals, f = param$fecundities, lam0 = param$pop_growth_mean),
......
......@@ -21,17 +21,29 @@ rm(list = ls(all.names = TRUE))
##### Fixed parameters #####
# We define theta = 1 for simplicity - given large uncertainty of real shape of density-dependence in nature
# We define theta = 1 (same as in PBR) - for simplicity, given large uncertainty of real shape of density-dependence in nature
fixed_theta = 1
# Coefficient of environmental variation -- set at 8%, based on values found for birds in the literature
## (Saeher & Engen 2002) between 7% et 14%, so about 10%
## (Sther et al. 2005) : mostly between 2.5% et 10%, so about 6%
coeff_var_environ = 0.08
# Coefficient of environmental variation (SD)
## Environnmental variance set at 8%, based on values found for birds in the literature:
## (Saeher & Engen 2002) : between 7% et 14 ==> average : 10%
## (Sther et al. 2005) : between 2.5% et 10% ==> average : 6%
coeff_var_environ = sqrt(0.08) # SD ~28%
# Coverage probability used for lower/upper interval input values
CP = 0.99
# Values of pop_growth (assumed), when the "trend" option is chosen
growth_weak <- 1.05
growth_average <- 1.10
growth_strong <- 1.15
decline_weak <- 0.97
decline_average <- 0.94
decline_strong <- 0.91
pop_stable <- 1
trend_se <- 0.03 # SE to use for pop_growth, when the "trend" option is chosen
}
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~###
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment