generate_I_fast {prevtoinc}R Documentation

Function to simulate PPS and data and calculate a number of estimators

Description

Function to simulate PPS and data and calculate a number of estimators

Usage

generate_I_fast(n.sample, P, dist.X.loi, data.theo = NULL,
  dist.X.los = NA, one.factor.loi = 1, one.factor.los = 1)

Arguments

n.sample

number of beds to simulate

P

average prevalence of nosocomial infections

dist.X.loi

vector of probabilities for values 1:length(dist.X.loi) of X.loi

data.theo

data frame with theoretical info generated by simulate_incidence_stats_* function

dist.X.los

vector of probabilities for values 1:length(dist.X.los) of X.los

one.factor.loi

factor by which to approx. reduce number of one day observations for A.loi

one.factor.los

factor by which to approx. reduce number of one day observations for A.los

Value

data frame with following columns

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).

Examples

example.dist <- create_dist_vec(function(x) dpois(x-1, 7), max.dist = 70)
generate_I_fast(200, P = 0.05, example.dist )


[Package prevtoinc version 0.12.0 Index]