facilityR0 | R Documentation |
Calculate basic reproduction number R0
facilityR0(S, C, A, transm, initS, mgf = NULL)
S |
A matrix of state transition rates between and removal from the susceptible states in the absence of colonized individuals |
C |
A matrix of state transition rates between and removal from the colonized states |
A |
A matrix describing transitions from susceptible to colonized states at acquisition |
transm |
A vector of transmission rates from each colonized state |
initS |
A vector of admission state probabilities to each susceptible state |
mgf |
The moment generating function characterizing the time-of-stay-dependent removal hazard |
A number (R0)
S <- rbind(c(-1,2),c(1,-2))
C <- rbind(c(-1.1,0),c(0.1,-0.9))
A <- rbind(c(1,0),c(0,2))
transm <- c(0.4,0.6)
initS <- c(0.9,0.1)
mgf <- function(x, deriv=0) MGFgamma(x, rate=0.01, shape=3.1, deriv)
facilityR0(S,C,A,transm,initS,mgf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.