.beta.MH.RW.glm |
Beta MH RW sampler from freq PEM fit |
.beta_MH_MALA |
Proposal beta with a Metropolis Adjusted Langevin (MALA) |
.beta_MH_NR |
Newton Raphson MH move |
.beta_MH_RW |
Beta Metropolis-Hastings Random walk move |
.beta_mom |
Mean for MALA using derivative for beta proposal |
.beta_mom.NR.fun |
First and second derivative of target for mode and variance of proposal |
.birth_move |
Birth move in RJMCMC |
.dataframe_fun |
Create data.frame for piecewise exponential models |
.death_move |
Death move in RJMCMC |
.glmFit |
Fit frequentist piecewise exponential model for MLE and information matrix of beta |
.ICAR_calc |
Calculate covariance matrix in the MVN-ICAR |
.input_check |
Input checker |
.J_RJMCMC |
RJMCMC (with Bayesian Borrowing) |
.J_RJMCMC_NoBorrow |
RJMCMC (without Bayesian Borrowing) |
.lambda_0_MH_cp |
Lambda_0 MH step, proposal from conditional conjugate posterior |
.lambda_0_MH_cp_NoBorrow |
Lambda_0 MH step, proposal from conditional conjugate posterior |
.lambda_conj_prop |
Propose lambda from a gamma conditional conjugate posterior proposal |
.lambda_MH_cp |
Lambda MH step, proposal from conditional conjugate posterior |
.lgamma_ratio |
Calculate log gamma ratio for two different parameter values |
.llikelihood_ratio_beta |
Loglikelihood ratio calculation for beta parameters |
.llikelihood_ratio_lambda |
Log likelihood for lambda / lambda_0 update |
.logsumexp |
Computes the logarithmic sum of an exponential |
.log_likelihood |
Log likelihood function |
.lprop.dens.beta.NR |
log Gaussian proposal density for Newton Raphson proposal |
.lprop_density_beta |
Log density of proposal for MALA |
.ltau_dprior |
Calculate log density tau prior |
.mu_update |
Calculate mu posterior update |
.normalize_prob |
Normalize a set of probability to one, using the the log-sum-exp trick |
.nu_sigma_update |
Calculates nu and sigma2 for the Gaussian Markov random field prior, for a given split point j |
.plot_hist |
Plot histogram from MCMC samples |
.plot_matrix |
Plot smoothed baseline hazards |
.plot_trace |
Plot MCMC trace |
.predictive_hazard |
Predictive hazard from BayesFBHborrow object |
.predictive_hazard_ratio |
Predictive hazard ratio (HR) from BayesFBHborrow object |
.predictive_survival |
Predictive survival from BayesFBHborrow object |
.set_hyperparameters |
Set tuning parameters |
.set_tuning_parameters |
Set tuning parameters |
.shuffle_split_point_location |
Metropolis Hastings step: shuffle the split point locations (with Bayesian borrowing) |
.shuffle_split_point_location_NoBorrow |
Metropolis Hastings step: shuffle the split point locations (without Bayesian borrowing) |
.sigma2_update |
Calculate sigma2 posterior update |
.smooth_hazard |
Smoothed hazard function |
.smooth_survival |
Smoothed survival curve |
.tau_update |
Sample tau from posterior distribution |
BayesFBHborrow |
BayesFBHborrow: Run MCMC for a piecewise exponential model |
BayesFBHborrow.NoBorrow |
Run the MCMC sampler without Bayesian Borrowing |
BayesFBHborrow.WBorrow |
Run the MCMC sampler with Bayesian Borrowing |
coef.BayesFBHborrow |
Extract mean posterior values |
GibbsMH |
S3 generic, calls the correct GibbsMH sampler |
GibbsMH.NoBorrow |
GibbsMH sampler, without Bayesian Borrowing |
GibbsMH.WBorrow |
GibbsMH sampler, with Bayesian Borrowing |
group_summary |
Create group level data |
init_lambda_hyperparameters |
Initialize lambda hyperparameters |
piecewise_exp_cc |
Example data, simulated from a piecewise exponential model. |
piecewise_exp_hist |
Example data, simulated from a piecewise exponential model. |
plot.BayesFBHborrow |
Plot the MCMC results |
summary.BayesFBHborrow |
Summarize fixed MCMC results |
weibull_cc |
Example data, simulated from a Weibull distribution. |
weibull_hist |
Example data, simulated from a Weibull distribution |