View source: R/meanlengthofstay.R
meanlengthofstay | R Documentation |
Calculate the mean length of stay for a linear facility model
meanlengthofstay(M, init, mgf)
M |
A matrix of state transition rates between facility patient states |
init |
A vector of admission state probabilities to each state |
mgf |
The moment generating function characterizing a time-of-stay-dependent removal hazard |
The mean length of stay
M <- rbind(c(-1.1,2),c(1,-2.2))
init <- c(0.9,0.1)
mgf <- function(x, deriv=0) MGFgamma(x, rate=0.2, shape=3, deriv)
meanlengthofstay(M, init, mgf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.