powered by
Calculate the equilibrium of a linear facility model
equilib(M, init, mgf = NULL)
A vector with the proportion of patients in each state at equilibrium
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(-0.06,0.03,0),c(0.06,-0.08,0),c(0,0.05,0)) init <- c(0.95,0.05,0) mgf <- function(x, deriv=0) MGFgamma(x, rate = 0.05, shape = 2.5, deriv) equilib(M, init, mgf)
Run the code above in your browser using DataLab