View source: R/estimationfunctions.R
| X_to_A_dist | R Documentation |
Transform a distribution of times of stay to a distribution of staying-time up to observation point under assumption of steady state.
X_to_A_dist(dist.stays)
dist.stays |
vector of probabilities of being at the hospital for 1:length(dist.stays) days at random time of observation |
vector of probabilities of staying 1:length(dist.point) days
# generate vector of probabilities for truncated Poisson distribution for
# distribution of times of stay X
dist.X <- dpois(1:70, 4)
plot(dist.X)
# transform to distribution of distribution of staying-time up to observation point under
# assumption of steady state
dist.A <- X_to_A_dist(dist.X)
plot(dist.A)
# transform back to get original distribution
dist.X.2 <- A_to_X_dist(dist.A)
plot(dist.X.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.