Description Usage Arguments Details Author(s) See Also Examples
A set of functions for simulating and summarizing birth-death simulations
1 | birth.death.simulant(t,X0=1,lambda=1,mu=2,nu=1, condCounts=NULL)
|
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). |
Birth-death process is denoted by X_t
Function birth.death.simulant returns a BDMC object.
Marc A. Suchard
add.joint.mean.many
,add.generator
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.