Mini project

Consider an age-structured population with stochastic project matrix \[ \mathbf{M}_t= \begin{bmatrix} 0 &0 &Z_t & Z_t & Z_t \\ 0.8 &0 &0 &0 &0 \\ 0 &0.8 &0 &0 &0 \\ 0 &0 &0.8 &0 &0 \\ 0 &0 &0 &0.8 &0 \end{bmatrix} \] where \(Z_t\) is log-normally and independently distributed across years with mean 1 and standard deviation of 0.5.

  1. Find the expected value of \(\mathbf{M}_t\) and, using R or similar software, compute the associated multiplicative growth rate of expected population size, the stable age distribution (a column vector \(\mathbf{u}\)), and the reproductive values (a row vector \(\mathbf{v}\) of each of the 5 age-classes. Remember to rescale \(\mathbf{u}\) and \(\mathbf{v}\) correctly. Which age-class has the highest reproductive value and why?
  2. Next, simulate a realisation of the population vector \(\mathbf{n}_t\) for \(t=1,2,\dots,1000\) assuming that the population initially is at the stable age-distribution with a total size of 100 individuals. At each time point \(t\), store the size of the population \(N_t = \sum_{i=1}^k n_{i,t}\) and its reproductive value \(V_t = \sum_{i=1}^k v_i n_{i,t} = \mathbf{v}\mathbf{n}_t\).
  3. Use the simulated realisation of the \(V_t\) to estimate the stochastic growthrate \(s=E(\Delta \ln V_t)\) and \(\sigma_s^2=\mbox{Var}(\Delta\ln V_t)\) using the theory in Ch 1.5.
  4. Using the theory in Ch. 4.3.3, compute \(\sigma_V^2=\mbox{Var}(\mathbf{v}\boldsymbol{\varepsilon}_t\mathbf{u})\). Note that the quadruple sum involving the covariances between the entries of \(\boldsymbol{\varepsilon}_t\) greatly simplifies for the above model. Also compute the theoretical approximations of the stochastic growthrate \(s=E(\Delta \ln V_t)\) and \(\sigma_s^2=\mbox{Var}(\Delta\ln V_t)\) and compare the results to the estimates in point 3.
  5. According to the theory, in the limit of small environmental noise, the increments of log total reproductive value, \(\Delta\ln V_t\), are uncorrelated. Examine to what extent this holds for the above model by plotting the autocorrelation function of the increments. If V is a vector in R containing $V_1,V_2,\dots,V_1000$ you can plot the autocorrelation function by doing acf(diff(log(V))). Compare with autocorrelation function of \(\Delta\ln N_t\). Simulate realisations of \(V_t\) for standard deviation of \(Z_t\) instead equal to 1 and 2 and examine how this changes the autocorrelation function.

Hint: Useful R functions to do this include:

  • diag (for creating diagonal matrices or blocks of matrices),
  • cbind, rbind (to join matrices columnwise and rowwise),
  • eigen (computes eigenvalues and right eigenvectors),
  • t (matrix and vector transposition - vectors are by default column vectors inn R, if you transpose you get a row vector),
  • Re (the dominant eigenvalues and vectors in this project are all real but are still stored as complex number with a zero imaginary component so this function may be useful for getting rid of these zero components),
  • %*% (matrix multiplication),
  • diff (computes the differences between subsequent observations in a time series),
  • acf (computes the sample autocorrelation function).

To simulate from a log-normal with the desired mean and variance, use the function

  # simulate n realisation from a lognormal with a given mean and standard deviation
  rlnorm2 <- function(n, mean, sd) {
    sdlog <- sqrt(log(sd^2/mean^2 + 1)) # standard deviation on the log scale
    meanlog <- log(mean) - sdlog^2/2 # mean on the logscale
    rlnorm(n, meanlog, sdlog)
  }

instead of the built-in R-function rlnorm.

2020-03-16, Jarle Tufto