simulate_pheno_ts: Compute phenotypic dynamic Time Series of trait + demographic...

Description Usage Arguments Details Value

View source: R/RcppExports.R

Description

Compute phenotypic dynamic Time Series of trait + demographic change under stabilizing selection as function of environment (after Lande Chevin)

Usage

1
2
simulate_pheno_ts(T, X, params, env_args, growth_fun = "independent",
  poisson = FALSE, varying_g = FALSE)

Arguments

T

end time, assuming start time of 1

X

parameters (z, a, b, wbar, logN, theta)

params

a list with (gamma_sh, omegaz, A, B, R0, var_a, Vb, delta, sigma_xi, rho_tau, fractgen)

env_args

extra args for env.fn

growth_fun

density-dependence ("independent", "gompertz", "thetalogistic", "ceiling")

poisson

(logical) return N(t+1) = Poisson(f(N(t)). NOTE: only implemented for independent and thetalog!

varying_g

varying genetic variance using stochastic house of cards (SHC) approximation. See Details.

Details

NB - for now assume Tchange = 0 and demography after CL 2010 For the SHC after Burger and Lynch (1995) and Kopp and Matuszewski (2013) \[ \sigma_SHC() = \frac2 V_m V_s1 + \fracV_s\alpha ^ 2 N_e \] For $\alpha^2$ the variance of the effect of new mutations, $V_m$ the genomic mutation rate per generation, and $N_e \approx 2 R_0 N / (2 R_0 - 1)$. As population size increases, the function approaches a limit of $2 V_s V_m$ $V_s = \omega^2 + \sigma_e^2$ (we hard code the latter as 1) is the width of the fitness function.

Value

a long matrix with columns zbar, abar, bbar, Wbar, Npop, theta


ashander/phenoecosim documentation built on May 10, 2017, 10:16 p.m.