powered by
Calculate the mean length of stay for a linear facility model
meanlengthofstay(M, init, mgf)
The mean length of stay
A matrix of state transition rates between facility patient states
A vector of admission state probabilities to each state
The moment generating function characterizing a time-of-stay-dependent removal hazard
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)
Run the code above in your browser using DataLab