Bayesian Dynamic Borrowing with Flexible Baseline Hazard Function
Run the MCMC sampler without Bayesian Borrowing
BayesFBHborrow: Run MCMC for a piecewise exponential model
Run the MCMC sampler with Bayesian Borrowing
Extract mean posterior values
Proposal beta with a Metropolis Adjusted Langevin (MALA)
Newton Raphson MH move
Beta Metropolis-Hastings random walk move
First and second derivative of target for mode and variance of proposa...
Mean for MALA using derivative for beta proposal
Beta MH RW sampler from freq PEM fit
Birth move in RJMCMC
Create data.frame for piecewise exponential models
Death move in RJMCMC
Fit frequentist piecewise exponential model for MLE and information ma...
Calculate covariance matrix in the MVN-ICAR
Input checker
RJMCMC (without Bayesian Borrowing)
RJMCMC (with Bayesian Borrowing)
Lambda_0 MH step, proposal from conditional conjugate posterior
Lambda_0 MH step, proposal from conditional conjugate posterior
Propose lambda from a gamma conditional conjugate posterior proposal
Lambda MH step, proposal from conditional conjugate posterior
Calculate log gamma ratio for two different parameter values
Loglikelihood ratio calculation for beta parameters
Log likelihood for lambda / lambda_0 update
Log likelihood function
Computes the logarithmic sum of an exponential
Log density of proposal for MALA
log Gaussian proposal density for Newton Raphson proposal
Calculate log density tau prior
Calculate mu posterior update
Normalize a set of probability to one, using the the log-sum-exp trick
Calculates nu and sigma2 for the Gaussian Markov random field prior, f...
Plot histogram from MCMC samples
Plot smoothed baseline hazards
Plot MCMC trace
Predictive hazard ratio (HR) from BayesFBHborrow object
Predictive hazard from BayesFBHborrow object
Predictive survival from BayesFBHborrow object
Set tuning parameters
Set tuning parameters
Metropolis Hastings step: shuffle the split point locations (without B...
Metropolis Hastings step: shuffle the split point locations (with Baye...
Calculate sigma2 posterior update
Smoothed hazard function
Smoothed survival curve
Sample tau from posterior distribution
GibbsMH sampler, without Bayesian Borrowing
S3 generic, calls the correct GibbsMH sampler
GibbsMH sampler, with Bayesian Borrowing
Create group level data
Initialize lambda hyperparameters
Plot the MCMC results
Summarize fixed MCMC results
Allows Bayesian borrowing from a historical dataset for time-to- event data. A flexible baseline hazard function is achieved via a piecewise exponential likelihood with time varying split points and smoothing prior on the historic baseline hazards. The method is described in Scott and Lewin (2024) <doi:10.48550/arXiv.2401.06082>, and the software paper is in Axillus et al. (2024) <doi:10.48550/arXiv.2408.04327>.