create_patient_history_add {prevtoinc}R Documentation

Function to simulate a single hospital bed trajectory

Description

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.

Usage

create_patient_history_add(X_los_dist, X_loi_dist, I, steps)

Arguments

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

Value

data frame with following columns

Examples



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)



[Package prevtoinc version 0.12.0 Index]