Skip to contents

This class extends the TestThenPool class to implement the Test-Then-Pool framework for equivalence trials.

Details

The TestThenPoolEquivalence class provides methods for testing and inference in equivalence trials using the Test-Then-Pool framework.

Super classes

Model -> TestThenPool -> TestThenPoolEquivalence

Public fields

significance_level

Significance level for the test

method

Method name

Methods

Inherited methods


TestThenPoolEquivalence$new()

Initializes a TestThenPoolEquivalence object.

Usage

TestThenPoolEquivalence$new(prior, mcmc_config = NULL)

Arguments

prior

The prior distribution for the treatment effect.

mcmc_config

Configuration for the MCMC sampling.


TestThenPoolEquivalence$test_pvalue()

Performs the test in the Test-Then-Pool framework for equivalence.

Usage

TestThenPoolEquivalence$test_pvalue(target_data, test_type = "t-test")

Arguments

target_data

The data from the target study.

test_type

Test type


TestThenPoolEquivalence$test()

Usage

TestThenPoolEquivalence$test(target_data, test_type = "t-test")

Arguments

target_data

Target study data

test_type

Frequentist test


TestThenPoolEquivalence$vectorised_test_pvalue()

Equivalence test p-value for every replicate at once.

inference() calls test() without a test type, so the t-test default is the one that runs in the simulation.

Usage

TestThenPoolEquivalence$vectorised_test_pvalue(target_data, samples)

Arguments

target_data

Target study data.

samples

Data frame of generated replicates.

Returns

A vector of p-values.


TestThenPoolEquivalence$vectorised_pool()

Rejecting equivalence's null means the studies are close enough to pool.

Usage

TestThenPoolEquivalence$vectorised_pool(p_value)

Arguments

p_value

Vector of p-values.

Returns

A logical vector.


TestThenPoolEquivalence$clone()

The objects of this class are cloneable with this method.

Usage

TestThenPoolEquivalence$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.