set_prior {psborrow} | R Documentation |
Specify prior distributions and predictors for MCMC methods
Description
Specify prior distributions and predictors for MCMC methods
Usage
set_prior(pred, prior, r0, alpha, sigma)
Arguments
pred |
Predictors to include in the weibull distribution. No covariates except for
treatment indicator is included if |
prior |
Prior distribution for the precision parameter that controls the degree of
borrowing. Half-cauchy distribution if |
r0 |
Initial values for the shape of the weibull distribution for time-to-events |
alpha |
Initial values for log of baseline hazard rate for external and internal control
arms. Length of |
sigma |
Initial values for precision parameter if |
Value
a .priorClass
class containing survival data and prior information
Examples
# hierachical Bayesian model with precision parameter follows a half-cauchy distribution
set_prior(pred = "none", prior = "cauchy", r0 = 1, alpha = c(0, 0), sigma = 0.03)
# hierachical Bayesian model with precision parameter follows a gamma distribution
set_prior(pred = "none", prior = "gamma", r0 = 1, alpha = c(0, 0))
# conventional Bayesian model to not borrow from external control arm
set_prior(pred = "none", prior = "no_ext", alpha = 0)
# conventional Bayesian model to fully borrow from external control arm
set_prior(pred = "none", prior = "full_ext", alpha = 0)