powered by
This function simulates a single realisation from a time-homogeneous immigration-death process.
imdeath(n=20,x0=0,lambda=1,mu=0.1)
An R stepfun object containing the sampled path of the process.
stepfun
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.
The rate at which new individual immigrate into the population. Defaults to 1.
The rate at which individuals within the population die, independently of all other individuals. Defaults to 0.1.
rcfmc, rdiff, stepfun, gillespie
rcfmc
rdiff
gillespie
plot(imdeath(50))
Run the code above in your browser using DataLab