dca | R Documentation |
Estimate decision curves for a list of predictive models and/or binary tests all at once. Necessary to make comparative inferences across multiple models or tests using their corresponding posterior draws.
dca(
.data,
thresholds = seq(0, 0.5, length = 51),
prior_p = NULL,
prior_se = NULL,
prior_sp = NULL,
priors = NULL,
threshold_varying_prior = FALSE,
ignorance_region_cutpoints = c(0.25, 0.75) * max(thresholds),
min_sens_prior_mean = 0.01,
max_sens_prior_mean = 0.99,
max_sens_prior_sample_size = 5,
ignorance_region_mean = 0.5,
ignorance_region_sample_size = 2,
prev_prior_mean = 0.5,
prev_prior_sample_size = 2,
summary_probs = c(0.025, 0.975),
external_prevalence_data = NULL,
prior_only = FALSE,
n_draws = 4000
)
.data |
A data.frame with an |
thresholds |
Numeric vector with probability thresholds with which
the net benefit should be computed (default is |
prior_p, prior_se, prior_sp |
Non-negative shape values for
Beta(alpha, beta) priors used for p, Se, and Sp, respectively.
Default is uniform prior for all parameters - Beta(1, 1).
A single vector of the form |
priors |
A list with threshold- and model-specific priors
should contain a vector for shape1 of prevalence (named |
summary_probs |
Probabilities used to compute credible intervals (defaults to a 95% Cr.I.). |
external_prevalence_data |
Vector with two positive integers giving number of diseased and non-diseased individuals, respectively, from external data (e.g., if analyzing nested case-control data, this is the number of cases and non-cases in the source population). |
prior_only |
If set to TRUE, will produce prior DCA. |
keep_fit |
Logical indicating whether to keep |
keep_draws |
Logical indicating whether to keep posterior
draws from |
constant_prior |
If TRUE (default), it will set a single prior for all models or tests in all thresholds. If FALSE, the prior will be threshold and, potentially, model/test-specific. |
min_prior_mean, max_prior_mean |
Minimum
and maximum prior mean for sensitivity and specificity.
Only used if |
refresh |
Control verbosity of |
An object of class BayesDCA
data(PredModelData)
fit <- dca(PredModelData)
plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.