simulate_di: Simulate dimorphic evolution

View source: R/simulate_di.R

simulate_diR Documentation

Simulate dimorphic evolution

Description

Simulates trait evolution after branching.

Usage

simulate_di(xstart, ntimes, pars, init, mu = 0.01, sigma = 0.1, dodge = 0.001)

Arguments

xstart

Starting trait value

ntimes

The number of time steps to simulate for

pars

An unevaluated parameter-list (e.g. as returned by get_default_pars)

init

A vector of four starting values for solving of the demographic equilibrium

mu

The mutation rate of the trait (per time step)

sigma

The (standard deviation of) mutational step size upon mutation

dodge

How much to displace each morph from the branching point once branching has occurred

Details

See ?simulate.

Value

A tibble containing the trait values in the two morphs at each time point.

See Also

find_equilibrium_di, get_gradient_di

Examples


pars <- get_default_pars()
simulate_di(0, 10, pars, init = rep(1000, 4))


rscherrer/speciomx documentation built on March 28, 2023, 8:49 p.m.