is_convergent: Evaluate convergence stability

View source: R/is_convergent.R

is_convergentR Documentation

Evaluate convergence stability

Description

Assesses whether an equilibrium trait value is convergent-stable, or attainable.

Usage

is_convergent(xeq, pars, init, step = 1e-04)

Arguments

xeq

Some equilibrium trait value

pars

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

init

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

step

How far from xeq the selection gradient should be computed

Details

This functions computes the selection gradient on both sides of the equilibrium xeq and looks at the sign of the difference between the two. If the selection gradient goes down at xeq the equilibrium is convergent, otherwise it is divergent.

Value

A boolean

See Also

is_stable

Examples


pars <- get_default_pars()
is_convergent(0, pars, init = rep(1000, 2))


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