getTrans.timeList: Compute transition probabilities over a grid at a list of...

Description Usage Arguments Value Examples

View source: R/bsd_package.R

Description

Transforms the output matrix from makeGrid.trans to interpretable transition probabilities using fft. Does this at several input times given in tList. Returns a list of matrices, where each list entry corresponds to a time in tList. The i,j entry of each matrix corresponds to the probability of transitioning from initNum type 1 particles and 0 type 2 particles to i type 1 particles, j type 2 particles, over the corresponding time length.

Usage

1
2
  getTrans.timeList(tList, lam, v, mu, initNum, s1.seq,
    s2.seq, dt)

Arguments

tList

A vector of numbers corresponding to the desired evaluation times

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

initNum

An integer giving the number of initial particles

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 evaluation time from tList, each matrix is a matrix of transition probabilities

Examples

1
2
3
4
5
tList = c(1,2);  dt = 1; lam = .5; v = .2; mu = .4; initNum = 10
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.timeList(tList, lam, v, mu, initNum, s1.seq, s2.seq, dt)

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