getTrans.initList: Compute transition probabilites over a grid at a list of...

Description Usage Arguments Value Examples

View source: R/bsd_package.R

Description

Transforms the output matrices from makeGrid.trans to a list of expected sufficient statistics matrices using fft. Does this at several initial particle counts from initList Returns a list of matrices, where each list entry corresponds to a number of initial particles The i,j entry of each matrix corresponds to the probability of transitioning to i type 1 particles and j type 2 particles, beginning with initNum type 1 particles, by the end of corresponding time interval.

Usage

1
2
  getTrans.initList(u, initList, lam, v, mu, s1.seq,
    s2.seq, dt)

Arguments

initList

A vector of integers corresponding to the desired initial particle counts

dt

A number giving the increment length used in solving the ODE

s1.seq

A vector of complex numbers; initial values of the ODE G

s2.seq

A vector of complex numbers as inputs of s2.seq

u

A number giving the observation interval length, equivalently the time to evaluate the ODEs

lam

Per-particle birth rate

v

Per-particle shift rate

mu

Per-particle death rate

Value

A list of matrices of dimension length(s1.seq) by length(s2.seq); each list entry corresponds to an initial number of particles from initList

Examples

1
2
3
4
5
6
7
initList = c(10,11)
#gives matrices of transition probabilities corresponding to 10 initial particles and 11 initial particles
u = 1; dt = 1; lam = .5; v = .2; mu = .4
gridLength = 32
s1.seq <- exp(2*pi*1i*seq(from = 0, to = (gridLength-1))/gridLength)
s2.seq <- exp(2*pi*1i*seq(from = 0, to = (gridLength-1))/gridLength)
getTrans.initList(u, initList, lam, v, mu, s1.seq, s2.seq, dt)

jasonxu90/bdsem documentation built on May 18, 2019, 5:54 p.m.