This class represents a Gaussian model using the NPP (Noninformative Power Prior) approach. It inherits from the Model class.
Super class
Model -> GaussianNPP
Public fields
power_parameter_meanThe mean of the prior on the power parameter.
power_parameter_stdThe standard deviation of the prior on the power parameter.
target_treatment_effect_estimateEstimate of the treatment effect in the target study
target_treatment_effect_standard_errorStandard error on the estimate of the treatment effect in the target study
pParameter of the initial Beta prior on the power parameter
qParameter of the initial Beta prior on the power parameter
prior_normconstNormalization constant of the prior
posterior_normconstNormalization constant of the posterior
max_posterior_pdfMaximum value of the posterior p.d.f., used for rejection sampling of the posterior p.d.f.
methodName of the method
summary_measure_likelihoodSummary measure likelihood
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_ess()Model$posterior_mean()Model$posterior_moments()Model$posterior_quantile()Model$posterior_to_RBesT()Model$print_model_summary()Model$prior_cdf()Model$prior_elir_ess()Model$prior_to_RBesT()Model$simulation_for_given_treatment_effect()Model$test_decision()
GaussianNPP$unnormalized_posterior_power_parameter_pdf()
Calculate the unnormalized posterior power parameter PDF.
GaussianNPP$power_parameter_posterior_pdf()
Return the posterior distribution of the power parameter
GaussianNPP$normalizing_constant_power_parameter()
Calculate the normalizing constant for the power parameter.
GaussianNPP$vectorised_replicate_inference()
Run every replicate at once
Discretising the Beta prior on the power parameter turns the method into
an ordinary normal mixture, so the posterior, its summaries and the
effective sample sizes all follow in closed form. This replaces the
nested numerical integration the replicate loop performs, in which each
evaluation of posterior_cdf() integrates over posterior_pdf(), which
itself integrates over the power parameter at every point.
The prior mixture is the same for every replicate, so it is built once.
Usage
GaussianNPP$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.
GaussianNPP$plot_power_parameter_posterior_pdf()
Plot posterior probability density function (PDF) of the power parameter
GaussianNPP$plot_power_parameter_vs_drift()
Plot the power parameter as a function of drift in treatment effect
Usage
GaussianNPP$plot_power_parameter_vs_drift(
source_treatment_effect_estimate,
target_data,
min_drift,
max_drift,
resolution
)