A class representing the design prior for Bayesian borrowing.
Methods
DesignPrior$create()
Creates a new instance of DesignPrior.
Usage
DesignPrior$create(
design_prior_type,
model,
source_data,
case_study_config,
simulation_config,
mcmc_config,
case_study,
target_control_rate = NULL
)Arguments
design_prior_typeThe type of design prior.
modelThe model object.
source_dataThe source data object.
case_study_configCase study configuration
simulation_configSimulation configuration
mcmc_configMCMC configuration
case_studyCase study name
target_control_rateThe control response rate of the simulated trials, or
NULL. Under a binomial likelihood the treatment effect is a difference in response rates, and the simulated trials, whose control rate is fixed, can only have an effect in(-target_control_rate, 1 - target_control_rate); the design prior is then taken given that control rate - seegiven_control_rate().
DesignPrior$given_control_rate()
The design prior given the target control rate
A difference in response rates is confined to
(-control_rate, 1 - control_rate) once the control rate is known. A
design prior defined on the treatment effect alone has no joint
distribution with the control rate to condition, so it is truncated to
that range and renormalised. Subclasses that can condition exactly
override this.