Skip to contents

Carrying out tests of the composite null hypothesis arising in mediation analysis

Minimax optimal test

mediation_test_minimax()
Minimax optimal testing
mediation_test_minimax_BH()
Minimax optimal testing, aiming for a control of false discovery rate à la Benjamini-Hochberg

Bayes risk optimal test

mediation_test_Bayes()
Bayes risk optimal testing

Utility functions

Maps

’Map’s of rejection probabilities for the Bayes risk optimal test and a function to compute them.

compute_map_rejection_probs()
Computing 'map's of rejection probabilities for the Bayes risk optimal test
map_01_0.05
'Map' of rejection probabilities for the Bayes risk optimal testing procedure, 0-1 loss function and 0.05 type-I error
map_quad_0.05
'Map' of rejection probabilities for the Bayes risk optimal testing procedure, quadratic loss function and 0.05 type-I error
map_quad_0.05_0.1
'Map' of rejection probabilities for the Bayes risk optimal testing procedure, quadratic loss function, 0.05 type-I error and 0.1 truncation
map_01_0.01
'Map' of rejection probabilities for the Bayes risk optimal testing procedure, 0-1 loss function and 0.01 type-I error
map_quad_0.01
'Map' of rejection probabilities for the Bayes risk optimal testing procedure, quadratic loss function and 0.01 type-I error
map_quad_0.01_0.1
'Map' of rejection probabilities for the Bayes risk optimal testing procedure, quadratic loss function, 0.01 type-I error and 0.1 truncation

Printing and plotting

print(<mediation.test>)
Prints the output of functions mediation_test_minimax and mediation_test_Bayes.
plot(<mediation.test>)
Plots the output of functions mediation_test_minimax and mediation_test_Bayes with the rejection region.
plot(<map.rejection.probabilities>)
Plots the 'map' of rejection probabilities for the Bayes risk optimal test