GaussianCommensuratePowerPrior class
Source:R/method_power_priors.R
GaussianCommensuratePowerPrior.RdThis class represents a Gaussian Commensurate Power Prior model.
Public fields
methodMethod name
heterogeneity_prior_familyHeterogeneity prior family (half_normal, inverse_gamma)
borrows_power_parameterWhether the model samples a power parameter
stan_model_prefixPrefix of the compiled Stan model's name
summary_variablesVariables to summarise from the posterior draws
Methods
Public 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_elir_ess()Model$prior_to_RBesT()Model$simulation_for_given_treatment_effect()Model$test_decision()MCMCModel$check_mcmc_config()MCMCModel$credible_interval()MCMCModel$draw_mcmc_prior()MCMCModel$inference()MCMCModel$posterior_cdf()MCMCModel$posterior_ess()MCMCModel$posterior_median()MCMCModel$posterior_pdf()MCMCModel$quadrature_posterior()MCMCModel$quadrature_prior()MCMCModel$sample_posterior()MCMCModel$stan_sampler()MCMCModel$summary_rows()MCMCModel$uses_quadrature()
GaussianCommensuratePowerPrior$new()
Initialize the GaussianCommensuratePowerPrior object
Usage
GaussianCommensuratePowerPrior$new(prior, mcmc_config)GaussianCommensuratePowerPrior$vectorised_replicate_inference()
Run all simulation replicates through a quadrature mixture
instead of launching one Stan fit per replicate. The Stan implementation
remains available through inference() for reference and single-data-set
analyses.
GaussianCommensuratePowerPrior$tau_posterior_moments()
Posterior mean and standard deviation of tau from the Stan
draws, reported as Inf where the moment does not exist, exactly as
the quadrature path reports them. A sample mean of such a moment would
be finite and run-dependent, or Inf and NaN once a draw overflows.
GaussianCommensuratePowerPrior$sample_prior()
Draw samples from the prior distribution. Based on equation (8) in Hobbs et al (2011); the plain commensurate prior shares it, with the power parameter at one.
GaussianCommensuratePowerPrior$joint_prior_pdf()
Joint prior p.d.f. Based on equation (8) in Hobbs et al (2011).
GaussianCommensuratePowerPrior$prior_pdf()
Prior p.d.f. of the treatment effect: the quadrature mixture the simulations use, which covers the whole prior. Integrating tau numerically over a finite window instead would drop most of the heavy-tailed priors: \([0.001, 100]\) keeps 0.9% of inverse_gamma(1/1000, 1) and 12% of a Cauchy(0, 30) on log(tau).
GaussianCommensuratePowerPrior$prior_cdf()
Prior c.d.f. of the treatment effect, from the same mixture
as prior_pdf(). Without it the MCMC parent would take the empirical
c.d.f. of prior draws.