Skip to contents

Propagate component test sensitivity and specificity into panel specificity assuming a known set of observations of component apparent prevalence

Usage

uncertain_panel_sens_estimator(
  pos_obs,
  n_obs,
  false_pos_controls = NULL,
  n_controls = NULL,
  false_neg_diseased = NULL,
  n_diseased = NULL,
  ...,
  sens = sens_prior(),
  spec = spec_prior(),
  samples = 1000,
  fit_beta = FALSE
)

Arguments

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.

...

not used

sens

the prior sensitivity of the test as a beta_dist.

spec

the prior specificity of the test as a beta_dist.

samples

number fo random draws of sensitivity and specificity

fit_beta

return the result as a beta_dist object?

Value

a vector of possible sensitivity values

Examples

uncertain_panel_sens_estimator(
  pos_obs = c(30,10,20,10,5), n_obs=1000,
  false_pos_controls = c(20,15,15,15,15), n_controls = c(800,800,800,800,800),
  false_neg_diseased = c(20,25,20,20,15), n_diseased = c(100,100,100,100,100),
  fit_beta = TRUE)
#> 82.1% [68.6%—91.7%] (N=41.1)