Description Usage Arguments Value Examples
Simulates the occupation of bed and incidence of HAIs of a single bed. Length of HAI is assumed to be additive to length of stay without HAI.
1 | create_patient_history_add(X_los_dist, X_loi_dist, I, steps)
|
X_los_dist |
vector of probabilities for values 1:length(dist.X.los) of X.los |
X_loi_dist |
vector of probabilities for values 1:length(dist.X.loi) of X.loi |
I |
incidence rate per patient-day at risk |
steps |
number of days to evolve trajectory of bed |
data frame with following columns
pat_nbr - sequential patient number
hai_nbr - sequential HAI number
X_los - predicted total length of stay for patient on current day
X_los_wo_hai -
X_loi - total length of current HAI
X_loi_tot - added total lengths of all HAIs up to day
A_los - length of stay up to day
X_lnint - length of stay after acquiring first HAI
1 2 3 4 5 | example.dist <- create_dist_vec(function(x) dpois(x-1, 7), max.dist = 70)
example.dist.los <- create_dist_vec(function(x) dpois(x-1, lambda = 12),
max.dist = 70)
bed_hist <- create_patient_history_add(example.dist.los, example.dist, I = 0.08, 1000)
tail(bed_hist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.