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 -> GaussianConjugate -> GaussianStaticBorrowing -> GaussianEmpiricalBayesPP

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.

Methods

Inherited methods


GaussianEmpiricalBayesPP$new()

Initialize the GaussianEmpiricalBayesPP object.

Usage

GaussianEmpiricalBayesPP$new(prior, null_space, theta_0)

Arguments

prior

The prior object.

null_space

Null space

theta_0

The theta_0 value.

Returns

NULL


GaussianEmpiricalBayesPP$empirical_bayes_update()

Empirical Bayes update

Usage

GaussianEmpiricalBayesPP$empirical_bayes_update(target_data)

Arguments

target_data

Target study data

Returns

NULL Perform inference using the GaussianEmpiricalBayesPP method.


GaussianEmpiricalBayesPP$inference()

Usage

GaussianEmpiricalBayesPP$inference(target_data)

Arguments

target_data

The target data.

Returns

The inference result. Estimate the power parameter.


GaussianEmpiricalBayesPP$power_parameter_estimation()

Usage

GaussianEmpiricalBayesPP$power_parameter_estimation()

Returns

The estimated power parameter.


GaussianEmpiricalBayesPP$vectorised_power_parameter()

Estimate the power parameter for every replicate at once

Subclasses whose estimator is closed form override this. Returning NULL means "no fast path", which keeps subclasses with an iterative estimator (PDCCPP calibrates by search) on the replicate loop.

Usage

GaussianEmpiricalBayesPP$vectorised_power_parameter(target_data, samples)

Arguments

target_data

Target study data.

samples

Data frame of generated replicates.

Returns

A vector of power parameters, or NULL.


GaussianEmpiricalBayesPP$vectorised_prior_variance()

Prior variance for each replicate

Mirrors empirical_bayes_update(): the power prior is equivalent to a Gaussian prior with variance source standard error^2 / power parameter, and a power parameter of zero means a vague prior.

Usage

GaussianEmpiricalBayesPP$vectorised_prior_variance(target_data, samples)

Arguments

target_data

Target study data.

samples

Data frame of generated replicates.

Returns

A vector of prior variances, or NULL.


GaussianEmpiricalBayesPP$vectorised_posterior_parameters()

Posterior parameters reported by the vectorised path

Usage

GaussianEmpiricalBayesPP$vectorised_posterior_parameters(prior_variance)

Arguments

prior_variance

Per-replicate prior variance.

Returns

A data frame with one power_parameter column.


GaussianEmpiricalBayesPP$prior_pdf()

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

Usage

GaussianEmpiricalBayesPP$prior_pdf(target_treatment_effect)

Arguments

target_treatment_effect

The target treatment effect.

Returns

The prior PDF.


GaussianEmpiricalBayesPP$plot_power_parameter_vs_drift()

Plot the power parameter as a function of drift in treatment effect

Usage

GaussianEmpiricalBayesPP$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.


GaussianEmpiricalBayesPP$clone()

The objects of this class are cloneable with this method.

Usage

GaussianEmpiricalBayesPP$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.