Bayesian Decision Curve Analysis for Survival outcomes
Usage
dca_surv(
.data,
prediction_time,
thresholds = seq(0, 0.5, length = 51),
keep_draws = TRUE,
keep_fit = FALSE,
summary_probs = c(0.025, 0.975),
positivity_prior = c(1, 1),
shape_prior = c("student", "gamma"),
scale_prior = c("student", "gamma"),
shape_prior_pars = c(10, 0, 1.5),
scale_prior_pars = c(30, 0, 100),
prior_only = FALSE,
iter = 4000,
refresh = 0,
...
)
Arguments
- .data
dataframe whose first column named "outcomes" is a
survival::Surv
object and remaining columns are the decision strategies to assess.- prediction_time
Prediction time horizon (e.g., if models predict risk of death at one year and data is in year,
prediction_time
should be1
.)- thresholds
Decision thresholds -- within interval (0, 1).
- keep_draws
If true, posterior draws are kept in the output object.
- keep_fit
If true,
stanfit
object is kept in the output object.- summary_probs
Probabilities for posterior credible intervals (defaults to a 95% Cr.I.).
- positivity_prior
Shape parameters for prior on positivity probability.
- shape_prior
type of prior distribution for shape parameter of the Weibull distribution. Either "student" or "gamma".
- scale_prior
type of prior distribution for scale parameter of the Weibull distribution. Either "student" or "gamma".
- shape_prior_pars
vector with prior parameters for the prior shape of the Weibull distribution. If
shape_prior="student"
, it should be a vector of length 3 with degrees of freedom, mean, and scale, respectively; ifshape_prior="gamma"
, it should be a vector of length 2 with shape and rate, respectively.- prior_only
If TRUE, samples from the prior only.
- iter
Passed to
rstan::sampling
. Number of iterations/draws for Stan.- refresh
- ...
Arguments passed to
rstan::sampling
(e.g. iter, chains). # nolint