GaussianEmpiricalBayesPP class
Source:R/method_empirical_bayes_power_prior.R
BinomialPValueBasedPP.RdThis is a parent class for variants of empirical Bayes PP methods for normally distributed summary measure of the treatment effect.
Super classes
Model -> MCMCModel -> BinomialCPP -> BinomialPValueBasedPP
Public fields
power_parameterThe power parameter.
summary_measure_likelihoodThe summary measure distribution.
null_spaceNull hypothesis space.
empirical_bayesBoolean indicating if empirical Bayes is used.
shape_parameterShape parameter
methodMethod name
prior_varPrior variance
mcmc_configMCMC configuration
fixed_power_parameterWhether the power parameter is the same for every replicate, so that the posterior is read off a cached prior kernel.
empirical_bayes_from_sampleWhether the empirical Bayes quantities are a function of the replicate's sample alone, so that a deterministic model may still share an analysis between replicates with equal samples.
Methods
Inherited methods
Model$calibrate_for_design()Model$check_data()Model$create()Model$estimate_bayesian_operating_characteristics()Model$estimate_frequentist_operating_characteristics()Model$hypothesis_space_transformation()Model$inference_cache_scope()Model$plot_pdfs()Model$plot_posterior_pdf()Model$plot_prior_pdf()Model$posterior_beta_mixture()Model$posterior_mean()Model$posterior_moments()Model$posterior_quantile()Model$posterior_to_RBesT()Model$print_model_summary()Model$prior_to_RBesT()Model$simulation_for_given_treatment_effect()Model$test_decision()Model$vectorised_replicate_inference()MCMCModel$check_mcmc_config()MCMCModel$compute_posterior_parameters()MCMCModel$credible_interval()MCMCModel$posterior_cdf()MCMCModel$posterior_ess()MCMCModel$posterior_median()MCMCModel$posterior_pdf()MCMCModel$prior_cdf()MCMCModel$sample_posterior()MCMCModel$sample_prior()MCMCModel$stan_sampler()MCMCModel$uses_quadrature()BinomialCPP$draw_mcmc_prior()BinomialCPP$prepare_data()BinomialCPP$prior_given_control_rate()BinomialCPP$quadrature_posterior()BinomialCPP$quadrature_prior()BinomialCPP$summary_rows()
BinomialPValueBasedPP$new()
Initialize the p_value_based_PP object.
Usage
BinomialPValueBasedPP$new(prior, theta_0, null_space, mcmc_config)BinomialPValueBasedPP$prior_elir_ess()
ELIR effective sample size of the current prior
The prior changes between replicates only through the power parameter,
so under the quadrature engine the ELIR is interpolated from a table over
the power parameter, shared across scenarios - see
binomial_power_prior_unit_elir(). Refitting a mixture to fresh prior
draws for every replicate, as the inherited route does, was most of the
method's run time. Under Stan the prior can only be sampled, so that
route is kept.
BinomialPValueBasedPP$test()
This method performs the test for the given target data.
Usage
BinomialPValueBasedPP$test(
target_data,
source_treatment_effect_estimate,
target_treatment_effect_estimate
)BinomialPValueBasedPP$power_parameter_estimation()
This method estimates the power parameter for the given target data.
BinomialPValueBasedPP$prior_pdf()
Calculate the prior probability density function (PDF) for a given target treatment effect.
BinomialPValueBasedPP$plot_power_parameter_vs_drift()
Plot the power parameter as a function of drift in treatment effect
Usage
BinomialPValueBasedPP$plot_power_parameter_vs_drift(
source_treatment_effect_estimate,
target_data,
min_drift,
max_drift,
resolution
)