calculate_I_rhame: Function to calculate incidence from PPS data using a...

Description Usage Arguments Value Examples

Description

Function to calculate incidence from PPS data using a Rhame-Sudderth like approach with estimates for x.loi and x.los supplied.

Usage

1
calculate_I_rhame(data, x.loi.hat, x.los.hat = NA, method = "rhame")

Arguments

data

one-row data frame which contains a column A.loi (only used to calculate P.hat) with lengths of nosocomial infections up to survey (a 0 indicates no HAI present)

x.loi.hat

value for estimated expected length of infection x_loi

x.los.hat

value for estimated expected length of stay x_los (optional)

method

a string with associated name for method

Value

one-row data frame with following columns

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# create example data for PPS
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)
data.pps.fast <- simulate_pps_fast(n.sample=200,
                                   P=0.05,
                                   dist.X.loi = example.dist,
                                   dist.X.los = example.dist.los)
head(data.pps.fast)

# estimate incidence based on Rhame-Sudderth formula
calculate_I_rhame(data = data.pps.fast,
                   x.loi.hat = 8,
                   x.los.hat = 13)

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