trans_mat_to_D_fxn: Take a character formula transition matrix and turn it into a...

Description Usage Arguments Details Value

View source: R/transition-matrix-to-function.R

Description

Take a character formula transition matrix and turn it into a function

Usage

1
trans_mat_to_D_fxn(D_mat, K, n_pars)

Arguments

D_mat

a KxK matrix of character transitions. See details

K

number of states

n_pars

number of parameters

Details

This function dynamically creates a list of functions that turn the character transition formulas provided by the user in D_mat into K^2 functions which take in arguments X0, ..., XK-1), par1, par2, ..., parn_pars, N, and t and output the numeric transition rate of an individual currently in state i to move to state j.

Value

a list of length K^2 where entry K(i-1) + j for i, j <= K is a function. See details.


skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.