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

Description Usage Arguments Details Author(s) See Also Examples

View source: R/BD_sim.R

Description

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

Usage

1
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.

Author(s)

Marc A. Suchard

See Also

add.joint.mean.many,add.generator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

DOBAD documentation built on May 2, 2019, 3:04 a.m.