A_to_X_dist: function to transform the distribution of stays to a fixed...

Description Usage Arguments Value Examples

Description

function to transform the distribution of stays to a fixed point to the distribution of the staying times

Usage

1
A_to_X_dist(dist.point)

Arguments

dist.point

vector of probabilities of staying 1:length(dist.point) days

Value

vector of probabilities of being at the hospital for 1:length(dist.point) days at random time of observation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

prevtoinc documentation built on June 18, 2019, 5:05 p.m.