sim.condBD: Simulate birth-death process, Conditionally upon observing...

Description Usage Arguments Details Value Author(s) Source See Also

View source: R/sim.condBD.R

Description

Functions for simulating a linear-birth-death process with birth parameter lambda, death parameter mu, and immigration parameter modelParams["n"]*lambda, conditional upon observing it at a finite discrete set of times over a finite time interval, [0,T].

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
sim.condBD(bd.PO = list(states = c(5, 7, 3),times = c(0, 0.4, 1)), N = 1,
           L = 0.5, m = 0.7, nu = 0.4, n.fft = 1024, prevSims=NULL)
## S3 method for class 'CTMC_PO_1'
sim.condBD.main(bd.PO=
      new("CTMC_PO_1", states=c(5,7,3), times=c(0,.4,1)),
      L=.5, m=.7, nu=.4,  n.fft=1024)
## S3 method for class 'list'
sim.condBD.main(bd.PO=
      list(states=c(5,7,3), times=c(0,.4,1)),
      L=.5, m=.7, nu=.4,  n.fft=1024)
## Default S3 method:
sim.condBD.main(bd.PO=
      list(states=c(5,7,3), times=c(0,.4,1)),
      L=.5, m=.7, nu=.4,  n.fft=1024)
sim.condBD.1(T=1, a=5, b=7, L=.5, m=.7, nu=.4, n.fft=1024)

Arguments

N

Number of simulations/replications to do

bd.PO

_P_artially _O_bserved process, i.e., the data. Needs to have "components" 'states', 'times', and 'T'. Can be CTMC_PO_1 or a list.

a

Starting state of chain

b

Ending state of chain

T

Duration of chain

L

Lambda, linear birth rate parameter

m

mu, linear death rate parameter

nu

nu, immigration rate parameter.

n.fft

Number of terms to use in the fast fourier transform when using the generating functions to compute probabilities or joint expectations for the birth-death process. See the add.joint.mean.many, etc, functions.

prevSims

A possibly-NULL list of previous simulation results which will be prepended to the current simulations.

Details

sim.condBD, given discretely observed data from a chain, simulates N birthdeath chains conditionally on the data.

sim.condBD.1 is the helper; it simulates one piece of the chain, given a starting and ending state. That process is repeated (via markov prop) to simulate across many data points. So it only takes arguments a,b,and T rather than a "CTMC_PO_1" as its data.

The method of simulating exactly is essentially that of Hobolth and Stone (2008). Briefly: we can write out the density of the time of the first jump up or of the first jump down. We can integrate it from 0 to T to compute the probability there is a jump up (down, respectively) in that time interval. Thus we can simulate whether or not there is a jump, and whether it is up or down. Then using the above mentioned density, we can simulate the time at which it occurs. For more details see Hobolth and Stone (2008).

Value

An object of class BDMC, ie a (linear) Birth-Death Markov Chain, except for sim.condBD which returns a list of objects of class BDMC.

Author(s)

Charles Doss

Source

Hobolth and Stone. (2008) Efficient Simulation from Finite-state, Continuous-Time Markov Chains with Incomplete Observations, submitted Annals of Applied Statistics.

See Also

add.joint.mean.many


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