Skip to contents

This is a parent class for variants of empirical Bayes PP methods for normally distributed summary measure of the treatment effect.

Format

R6Class object.

Super classes

Model -> MCMCModel -> BinomialCPP -> BinomialPValueBasedPP

Public fields

power_parameter

The power parameter.

summary_measure_likelihood

The summary measure distribution.

null_space

Null hypothesis space.

empirical_bayes

Boolean indicating if empirical Bayes is used.

shape_parameter

Shape parameter

method

Method name

prior_var

Prior variance

mcmc_config

MCMC configuration

fixed_power_parameter

Whether the power parameter is the same for every replicate, so that the posterior is read off a cached prior kernel.

empirical_bayes_from_sample

Whether 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


BinomialPValueBasedPP$new()

Initialize the p_value_based_PP object.

Usage

BinomialPValueBasedPP$new(prior, theta_0, null_space, mcmc_config)

Arguments

prior

The prior object.

theta_0

Boundary of the null hypothesis space

null_space

Null space.

mcmc_config

MCMC configuration.

Returns

None


BinomialPValueBasedPP$empirical_bayes_update()

Empirical Bayes update

Usage

BinomialPValueBasedPP$empirical_bayes_update(target_data)

Arguments

target_data

Target study data

Returns

NULL Perform inference using the GaussianEmpiricalBayesPP method.


BinomialPValueBasedPP$inference()

Usage

BinomialPValueBasedPP$inference(target_data)

Arguments

target_data

The target data.

Returns

The inference result.


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.

Usage

BinomialPValueBasedPP$prior_elir_ess(target_data, simulation_config)

Arguments

target_data

Target study data, whose sampling standard deviation is the reference scale.

simulation_config

Configuration of simulation study

Returns

The ELIR effective sample size. Test method


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
)

Arguments

target_data

The target data object.

source_treatment_effect_estimate

The source treatment effect estimate.

target_treatment_effect_estimate

The target treatment effect estimate.

Returns

The p-value. Power parameter estimation method


BinomialPValueBasedPP$power_parameter_estimation()

This method estimates the power parameter for the given target data.

Usage

BinomialPValueBasedPP$power_parameter_estimation(target_data)

Arguments

target_data

The target data object.

source_treatment_effect_estimate

The source treatment effect estimate.

target_treatment_effect_estimate

The target treatment effect estimate.

Returns

The power parameter.


BinomialPValueBasedPP$prior_pdf()

Calculate the prior probability density function (PDF) for a given target treatment effect.

Usage

BinomialPValueBasedPP$prior_pdf(target_treatment_effect)

Arguments

target_treatment_effect

The target treatment effect.

Returns

The prior PDF.


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
)

Arguments

source_treatment_effect_estimate

Treatment effect estimate in the source study

target_data

Target study data

min_drift

Minimum drift value

max_drift

Maximum drift value

resolution

Number of points on the drift grid.

Returns

The prior PDF.


BinomialPValueBasedPP$clone()

The objects of this class are cloneable with this method.

Usage

BinomialPValueBasedPP$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.