This class represents a conjugate Gaussian model (Gaussian prior and Gaussian likelihood)
Super class
Model -> GaussianConjugate
Public fields
prior_meanPrior mean
prior_varPrior variance
empirical_bayesWhether the method relies on empirical Bayes or not
post_meanPosterior mean
post_varPosterior variance
posterior_parametersPosterior parameters
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()Model$inference_cache_scope()Model$plot_pdfs()Model$plot_posterior_pdf()Model$plot_prior_pdf()Model$posterior_beta_mixture()Model$posterior_ess()Model$posterior_quantile()Model$print_model_summary()Model$prior_elir_ess()Model$simulation_for_given_treatment_effect()Model$summary_rows()Model$test_decision()
GaussianConjugate$new()
Initialize object from the GaussianConjugate class
Usage
GaussianConjugate$new(prior)GaussianConjugate$vectorised_replicate_inference()
Run every replicate at once
The prior is a single normal, so the posterior is available in closed
form for all replicates simultaneously. Empirical Bayes subclasses
re-derive the prior variance from each replicate; they supply it through
vectorised_prior_variance().
Usage
GaussianConjugate$vectorised_replicate_inference(
target_data,
samples,
to_return,
critical_value,
theta_0,
confidence_level,
null_space
)Arguments
target_dataTarget study data.
samplesData frame of generated replicates.
to_returnCharacter vector of requested outputs.
critical_valueCritical value for hypothesis testing.
theta_0Null hypothesis value.
confidence_levelConfidence level for the credible interval.
null_spaceThe null space for hypothesis testing.
GaussianConjugate$vectorised_prior_variance()
Prior variance for each replicate
Declines the vectorised path by default. Subclasses with a genuinely fixed prior return it, and empirical Bayes subclasses return one variance per replicate.
GaussianConjugate$vectorised_posterior_parameters()
Posterior parameters reported by the vectorised path
The plain conjugate models report none. Empirical Bayes subclasses override this to report the power parameter they estimated.