Execute one of a set of bayesian models
Source:R/true_panel_prevalence.R
bayesian_panel_true_prevalence_model.RdExecute one of a set of bayesian models
Usage
bayesian_panel_true_prevalence_model(
...,
model_type = c("logit", "simpler", "complex")
)Arguments
- ...
Arguments passed on to
bayesian_panel_complex_model,bayesian_panel_simpler_model,bayesian_panel_logit_modeltest_resultsA dataframe containing the following columns:
id (character) - the patient identifier
test (factor) - the test type
result (logical) - the test result
Ungrouped.
No default value.
panel_sensthe prior sensitivity of the panel as a
beta_dist(optional)panel_specthe prior specificity of the panel as a
beta_dist(optional)panel_namethe name of the panel for combined result
cache_resultsave the result of the sampling in memory for the current session
false_pos_controlsthe 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_controlsthe number of controls in the specificity disease-free control group.
false_neg_diseasedthe number of negatives that appeared in the sensitivity confirmed disease group. These are by definition false negatives. This is (1-sensitivity)*n_diseased
n_diseasedthe number of confirmed disease cases in the sensitivity control group.
sensthe prior sensitivity of the test as a
beta_dist.specthe prior specificity of the test as a
beta_dist.confintconfidence interval limits
fmta
sprintfformatting string accepting 3 numberschainsA positive integer specifying the number of Markov chains. The default is 4.
iterA positive integer specifying the number of iterations for each chain (including warmup). The default is 2000.
warmupA positive integer specifying the number of warmup (aka burnin) iterations per chain. If step-size adaptation is on (which it is by default), this also controls the number of iterations for which adaptation is run (and hence these warmup samples should not be used for inference). The number of warmup iterations should be smaller than
iterand the default isiter/2.panel_pos_obsthe number of positive observations for a given panel of tests
panel_n_obsthe number of observations for each component test
test_namesa vector of the component test names in desired order
pos_obsthe number of positive observations for a given test
n_obsthe number of observations for a given test
- model_type
The bayesian model used one of "logit", "simpler", "complex"
Value
A dataframe containing the following columns:
test (character) - the name of the test or panel
prevalence.lower (numeric) - the lower estimate
prevalence.median (numeric) - the median estimate
prevalence.upper (numeric) - the upper estimate
prevalence.method (character) - the method of estimation
prevalence.label (character) - a fomatted label of the true prevalence estimate with CI
Ungrouped.
No default value.