Skip to contents

Fitting

Fit a Bayesian pooling survival model: EXNEX (pooling = "exnex"), complete pooling ("complete"), or no pooling ("none").

pooling_surv()
Fit Bayesian Pooling Survival Models
exnex_surv()
Deprecated alias for EXNEX fitting

Inference and model selection

Posterior summaries, survival curves, model comparison and simulation.

survival_curves()
Survival curves from an pooling_surv fit
plot(<survival_exnex>)
Plot survival curves from an pooling_surv fit
median_survival()
Posterior median survival time
rmst()
Restricted mean survival time (RMST) from an pooling_surv fit
compute_waic()
Pointwise log-likelihood and WAIC from an pooling_surv fit
compare_waic()
Compare multiple pooling_surv fits by WAIC
probability_superiority()
Posterior probability that one group beats another
rank_probabilities()
Posterior rank probabilities for each group
convergence_diagnostics()
Convergence diagnostics (R-hat and effective sample size)
simulate_data()
Simulate basket-trial log-normal survival data

Model checking and visuals

Posterior predictive checks and shrinkage diagnostics for fitted pooling_surv objects.

posterior_predictive_check()
Posterior predictive survival curves
shrinkage_plot()
Visualize shrinkage of group effects

Methods for fitted objects

Summarise, print, and plot fitted pooling_surv objects.

summary(<pooling_surv>)
Summarize posterior draws from an pooling_surv fit
print(<pooling_surv>)
Print an pooling_surv fit
plot(<pooling_surv>)
Plot parameter traces from an pooling_surv fit

Internal functions

These functions are internal and not exported; use with caution.

cpp_exnex_gibbs()
Main Gibbs Sampler for EXNEX Survival Models
pooling_surv_bridge()
Bridge connecting hardhat processed data to the C++ Gibbs Sampler
new_pooling_surv()
Constructor for pooling_surv Objects
.extract_event_vector()
Extract event vector from outcomes
.extract_time_vector()
Extract time vector from outcomes
.make_chain_seeds()
Derive one deterministic seed per chain (restores the global RNG state)
.run_chains_parallel_pooling()
Run all chains concurrently on future workers
.run_single_chain_pooling()
Run a single chain by calling the C++ kernel once