... | ... | @@ -89,7 +89,7 @@ create_ancestor_species <- function(landscape, config) { |
|
|
|
|
|
This function draws the dispersal kernel from a Weibull distriution with shape and scale parameters.
|
|
|
|
|
|
Explored paramters:
|
|
|
Explored parameters:
|
|
|
|
|
|
params$WeibullShape = [2,15]
|
|
|
|
... | ... | @@ -121,7 +121,7 @@ apply_evolution <- function(species, cluster_indices, landscape, config) { |
|
|
traits <- species[["traits"]]
|
|
|
traits[, "temp"] <- traits[, "temp"] + rnorm(1, mean = 0, sd = params$Tev)
|
|
|
|
|
|
# set bounds between 0 and 1 so the species can;t evolve a niche beyond that present in the data (all temp is scaled between 0 and 1)
|
|
|
# set bounds between 0 and 1 so the species can’t evolve a niche beyond that present in the data (all temp is scaled between 0 and 1)
|
|
|
if(any(traits[, "temp"] > 1)){traits[which(traits[,"temp"]>1), "temp"] <- 1}
|
|
|
if(any(traits[, "temp"] < 0)){traits[which(traits[,"temp"]<0), "temp"] <- 0}
|
|
|
|
... | ... | @@ -133,9 +133,9 @@ apply_evolution <- function(species, cluster_indices, landscape, config) { |
|
|
|
|
|
### 1.3.2 Cluster-level OU + BM (Evolutionary Speed Hypothesis, Skeels et al 2021)
|
|
|
|
|
|
This function evolves a temperature-niche trait under a Ornstein Uhlenbeck model of trait evolution and evolves a body size trait under a Brownian Motion model. The OU model has a random walk element as in the Brownian motion model and also a parameter (*psi*) that draws the value towards an optimal value (based on the mean temperature value across the clusters geographic range). When *psi=0* OU = BM. The OU and BM models each have an independant rate parameter (*sigma_squared*). This function evolves each geographic cluster seperately (instead of each species speerately or each grid cell seperately).
|
|
|
This function evolves a temperature-niche trait under an Ornstein Uhlenbeck model of trait evolution and evolves a body size trait under a Brownian Motion model. The OU model has a random walk element as in the Brownian motion model and also a parameter (*psi*) that draws the value towards an optimal value (based on the mean temperature value across the clusters geographic range). When *psi=0* OU = BM. The OU and BM models each have an independant rate parameter (*sigma_squared*). This function evolves each geographic cluster seperately (instead of each species speerately or each grid cell seperately).
|
|
|
|
|
|
Explored paramters:
|
|
|
Explored parameters:
|
|
|
params$sigma_squared_bs = [0.001, 0.02]
|
|
|
params$sigma_squared_t = [0.001, 0.015]
|
|
|
params$psi = 0
|
... | ... | |