Lab 3
Date: 01.25.2019
Last week we projected populations, but assumed
'r' is constant
it does not change, ever
far from truth
Nature is unpredictable
Stochasticity ~ 'the quality of lacking any predictable order'
Environmental- The unpredictable variation in population dynamics due to unpredictable variation in environment.
Demographic - The unpredicable variation in poulation dynamics due to random fluctuations in population growth rate, usually an issue of small populations
By treating population parameters as random variable.
In our case, as of now, we are dealing with exponential growth model
So our population parameter is 'r'
We will treat 'r' as a random variable
Assume 'r' is normally distributed
#time = length(lambda) e.g., time=20
#sample a value of r for each time step
r_sim = rnorm(time, mean, sd)
Draw one value of 'r' from the distribution
for (i in 1:time) {
r_sim[i]
N_sim[i+1] = N_sim [i]* exp(r_sim[i])
}
##write the function
exp.stoch<- funtion(r_sim){
for(i in 1:time){
N_Sim[i+1]= N_sim[i]* exp(r_sim[i]) }
N_sim }
n_sims=no. of iterations
for(s in 1:n_sims){
r_sim=rnorm(time,r,sd)
N = exp.stoch (r_sim) stoch.out[,s]=N
}
Reading for quiz- Engen et al. 2001
Logistic growth model
Reading: Sibley & Hone 2002