find_equilibrium_di: Find the dimorphic demographic equilibrium

View source: R/find_equilibrium_di.R

find_equilibrium_diR Documentation

Find the dimorphic demographic equilibrium

Description

Solves the demographic equilibrium equation for the population sizes in the two morphs and the two habitats, after branching has occurred, given parameter values.

Usage

find_equilibrium_di(xres1, xres2, pars, init)

Arguments

xres1

The resident trait value in the first morph

xres2

The resident trait value in the second morph

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

Details

This function uses a multivariate numerical root finding algorithm (?pracma::fsolve) to find solutions to the equation.

Value

A vector of four equilibrium population sizes: morph 1 in habitat 1, morph 1 in habitat 2, morph 2 in habitat 1 and morph 2 in habitat 2.

Examples


pars <- get_default_pars()
find_equilibrium_di(-0.001, 0.001, pars, init = rep(1000, 4))


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