DOBAD (version 1.0.6)

birth.death.simulant: Simulation of birth-death processes with immigration

Description

A set of functions for simulating and summarizing birth-death simulations

Usage

birth.death.simulant(t,X0=1,lambda=1,mu=2,nu=1, condCounts=NULL)

Arguments

t

length of the time interval

lambda

per particle birth rate

mu

per particle death rate

nu

immigration rate

X0

starting state, a non-negative integer

condCounts

is either null or a numeric vector with items named "Nplus" and "Nminus" (possibly from BDsummaryStats).

Details

Birth-death process is denoted by \(X_t\)

Function birth.death.simulant returns a BDMC object.

See Also

add.joint.mean.many,add.generator

Examples

Run this code
# NOT RUN {
my.lambda = 2
my.mu = 3
my.nu =1
my.time = 0.5
my.start = 10
my.end = 2
my.n = 2000

# simulate a birth death trajectory
my.simulant=birth.death.simulant(t=my.time,X0=my.start,lambda=my.lambda,mu=my.mu,nu=my.nu)
print(my.simulant)

# summarize the simulated trajectory
BDsummaryStats(my.simulant)

# }

Run the code above in your browser using DataLab