getTrans.MC: Calculate empirical transition probabilities

Description Usage Arguments Details Value Examples

View source: R/bsd_package.R

Description

Calculates transition probabilities empirically using Monte Carlo simulation

Usage

1
  getTrans.MC(N, tList, lam, v, mu, initNum)

Arguments

N

An integer, the number of MC simulations per element of tList

tList

A list of observation interval lengths to simulate

lam

Per-particle birth rate

v

Per-particle shift rate

mu

Per-particle death rate

initNum

Integer giving the number of initial particles

Details

Note: function can be modified to initialize matrices to be larger sized in the case where rates are large

Value

A list of matrices, where each entry of the list corresponds to an element of tList. The i,j entry of each matrix in the list give the probability of the process ending with i type 1 particles and j type 2 particles, beginning with initNum type 1 particles, by the end of the corresponding observation length.

Examples

1
2
N = 50; tList = c(.5,1); lam = .2; v = .1; mu = .15; initNum = 10
getTrans.MC(N,tList,lam,v,mu,initNum)

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