calculate_I: Function to calculate different estimators for I from PPS...

Description Usage Arguments Value Examples

Description

Function to calculate different estimators for I from PPS data.

Usage

1
calculate_I(data, data.theo = NULL)

Arguments

data

data frame as generated by 'simulate_pps_data' or 'simulate_pps_fast'

data.theo

data frame as generated by 'simulate_incidence_stats' or 'simulate incidence_stats_fast“

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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(data = data.pps.fast)

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