Skip to contents

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

Details

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

Super classes

Model -> TestThenPool -> TestThenPoolDifference

Public fields

significance_level

Significance level for the test

method

Method name

Methods

Inherited methods


TestThenPoolDifference$new()

Instantiate model

Usage

TestThenPoolDifference$new(prior, mcmc_config = NULL)

Arguments

prior

Prior

mcmc_config

MCMC configuration


TestThenPoolDifference$test_pvalue()

Usage

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

Arguments

target_data

Target study data

test_type

Frequentist test


TestThenPoolDifference$test()

Usage

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

Arguments

target_data

Target study data

test_type

Frequentist test


TestThenPoolDifference$vectorised_test_pvalue()

Difference 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

TestThenPoolDifference$vectorised_test_pvalue(target_data, samples)

Arguments

target_data

Target study data.

samples

Data frame of generated replicates.

Returns

A vector of p-values.


TestThenPoolDifference$vectorised_pool()

Failing to detect a difference means the data can be pooled.

Usage

TestThenPoolDifference$vectorised_pool(p_value)

Arguments

p_value

Vector of p-values.

Returns

A logical vector.


TestThenPoolDifference$clone()

The objects of this class are cloneable with this method.

Usage

TestThenPoolDifference$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.