Rogan-Gladen true prevalence for panel with resampling
Source:R/uncertain_panel_rogan_gladen.R
uncertain_panel_rogan_gladen.Rd
Uses resampling to incorporate uncertainty of sensitivity and specificity into an estimate of true prevalence from a given value of apparent prevalence.
Usage
uncertain_panel_rogan_gladen(
panel_pos_obs,
panel_n_obs,
pos_obs,
n_obs,
false_pos_controls = NULL,
n_controls = NULL,
false_neg_diseased = NULL,
n_diseased = NULL,
...,
sens = sens_prior(),
spec = spec_prior(),
confint = 0.95,
fmt = "%1.2f%% [%1.2f%% — %1.2f%%]",
samples = 1000
)
Arguments
- panel_pos_obs
the number of positive observations for a given panel of tests
- panel_n_obs
the number of observations for each component test
- pos_obs
the number of positive observations for a given test
- n_obs
the number of observations for a given test
- false_pos_controls
the number of positives that appeared in the specificity disease-free control group. These are by definition false positives. This is (1-specificity)*n_controls
- n_controls
the number of controls in the specificity disease-free control group.
- false_neg_diseased
the number of negatives that appeared in the sensitivity confirmed disease group. These are by definition false negatives. This is (1-sensitivity)*n_diseased
- n_diseased
the number of confirmed disease cases in the sensitivity control group.
- ...
Arguments passed on to
uncertain_rogan_gladen
seed
set seed for reproducibility
- sens
the prior sensitivity of the test as a
beta_dist
.- spec
the prior specificity of the test as a
beta_dist
.- confint
confidence interval limits
- fmt
a
sprintf
formatting string accepting 3 numbers- samples
number fo random draws of sensitivity and specificity