dot-dca_binary: Fit Bayesian Decision Curve Analysis using Stan for list of...

.dca_binaryR Documentation

Fit Bayesian Decision Curve Analysis using Stan for list of models or binary tests

Description

Fit Bayesian Decision Curve Analysis using Stan for list of models or binary tests

Usage

.dca_binary(
  n_thr,
  strategies,
  N,
  d,
  tp,
  tn,
  thresholds,
  prior_p1,
  prior_p2,
  prior_Se1,
  prior_Se2,
  prior_Sp1,
  prior_Sp2,
  N_ext = 0,
  d_ext = 0,
  n_draws = 4000
)

Arguments

n_thr

Number of thresholds (int.).

N

Sample size (vector of integers of length n_thr).

d

Diseased: number of diseased persons or events (vector of integers of length n_thr).

tp

True Positives: number of diseased persons correctly identified as such by the diagnostic test of prediction model (matrix of integers of size n_thr by n_strategies).

tn

True Negatives: number of diseased persons correctly identified as such by the diagnostic test of prediction model (matrix of integers of size n_thr by n_strategies).

thresholds

Numeric vector with probability thresholds with which the net benefit should be computed (default is seq(0.01, 0.5, 0.01)).

N_ext, d_ext

External sample size and number of diseased individuals (or cases), respectively, used to adjust prevalence.

n_strategies

Number of models or binary tests (int.).

prior_p, prior_se, prior_sp

Prior parameters for prevalence, sensitivity, and specificity (numeric matrices of size n_thr by n_strategies).

refresh

Control verbosity of rstan::sampling.

...

Arguments passed to rstan::sampling (e.g. iter, chains).

Value

An object of class stanfit returned by rstan::sampling (e.g. iter, chains)


giulianonetto/bayesdca documentation built on Aug. 31, 2023, 11:07 a.m.