Base class of the binomial models whose prior, integrated over
every source parameter and hyperparameter, is a fixed prior on the target
control rate and the risk difference, tabulated on the lattice of
binomial_npp_prior_kernels(). The posterior of a dataset is that prior
times the target likelihood, so it costs one weighted sum; the prior, the
prior given a control rate and the prior ELIR follow from the same table.
A subclass implements kernels(), returning a list with n_lattice,
rates, differences, the prior kernel and, optionally, the moment
kernels read by binomial_npp_posterior(); kernel_key(), identifying
the prior for the ELIR cache; and compute_posterior_parameters().
Public fields
n_latticeNumber of lattice points on the response rates.
quadrature_availableThe posterior is computed by quadrature.
Methods
Inherited methods
Model$calibrate_for_design()Model$check_data()Model$create()Model$empirical_bayes_update()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$draw_mcmc_prior()MCMCModel$inference()MCMCModel$posterior_cdf()MCMCModel$posterior_ess()MCMCModel$posterior_median()MCMCModel$posterior_pdf()MCMCModel$prepare_data()MCMCModel$prior_cdf()MCMCModel$prior_pdf()MCMCModel$sample_posterior()MCMCModel$sample_prior()MCMCModel$stan_sampler()MCMCModel$summary_rows()MCMCModel$uses_quadrature()
BinomialLatticePrior$new()
Initialize a binomial lattice model.
Usage
BinomialLatticePrior$new(prior, mcmc_config)BinomialLatticePrior$kernel_key()
What identifies the prior, for the ELIR cache. Subclasses must implement it.
BinomialLatticePrior$quadrature_posterior()
The posterior on a grid
Returns
A grid_posterior() list.
BinomialLatticePrior$quadrature_prior()
The prior of the treatment effect on a grid.
Returns
A grid_posterior() list.
BinomialLatticePrior$prior_given_control_rate()
The prior of the treatment effect given the target control rate
The kernel's row for the lattice cell that contains control_rate,
which confines the treatment effect to the differences that keep the
target treatment rate in \([0, 1]\).
BinomialLatticePrior$prior_elir_ess()
ELIR effective sample size of the prior
The prior does not depend on the target data, so its unit-scale ELIR is
computed once per worker, as the mean over several mixture fits under a
fixed seed (see grid_prior_unit_elir()), and rescaled by the target's
sampling standard deviation.