imdeath: Simulate a sample path from the homogeneous immigration-death...

View source: R/imdeath.R

imdeathR Documentation

Simulate a sample path from the homogeneous immigration-death process

Description

This function simulates a single realisation from a time-homogeneous immigration-death process.

Usage

imdeath(n=20,x0=0,lambda=1,mu=0.1)

Arguments

n

The number of states to be sampled from the process, not including the initial state, x0

x0

The initial state of the process, which defaults to zero.

lambda

The rate at which new individual immigrate into the population. Defaults to 1.

mu

The rate at which individuals within the population die, independently of all other individuals. Defaults to 0.1.

Value

An R stepfun object containing the sampled path of the process.

See Also

rcfmc, rdiff, stepfun, gillespie

Examples

plot(imdeath(50))

smfsb documentation built on Jan. 13, 2024, 3:02 a.m.