powered by
Function to simulate PPS and data and calculate a number of estimators
generate_I_fast(n.sample, P, dist.X.loi, data.theo = NULL, dist.X.los = NA, one.factor.loi = 1, one.factor.los = 1)
number of beds to simulate
average prevalence of nosocomial infections
vector of probabilities for values 1:length(dist.X.loi) of X.loi
data frame with theoretical info generated by simulate_incidence_stats_* function
vector of probabilities for values 1:length(dist.X.los) of X.los
factor by which to approx. reduce number of one day observations for A.loi
factor by which to approx. reduce number of one day observations for A.los
data frame with following columns
n - number of patients sampled
n.noso - number of HAIs
P.hat - estimate of prevalence P
I.hat - estimate of incidence rate I
I.pp.hat - estimate of incidence proportion per admission I.pp
x.loi.hat - estimate of x.loi
x.los.hat - estimate of x.los
method - name of the method
and rows for the estimators gren, rear, pps.median, pps.mean, pps.mixed, rhame.theo, L.full (for a description of the estimators see vignette).
# NOT RUN { example.dist <- create_dist_vec(function(x) dpois(x-1, 7), max.dist = 70) generate_I_fast(200, P = 0.05, example.dist ) # }
Run the code above in your browser using DataLab