set_prior | R Documentation |
Specify prior distributions and predictors for MCMC methods
set_prior(pred, prior, r0, alpha, sigma)
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 |
a .priorClass
class containing survival data and prior information
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.