Description Usage Arguments Value Examples
test_simul
is used to conduct a simulation which compare the sample size and detection rates of sequential GLR-lik, discrete mixture test and a fixed sample size test based on the sample mean.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | test_simul(
mu_target,
mu_true = mu_target,
mu_0,
alpha = 0.1,
beta = 0.1,
B = 100,
print_progress = TRUE,
print_result = FALSE,
sample_generator = G_sample,
power_fn = G_pwr,
fixed_test_fn = z_test,
seq_test_fn = seq_G_test_generator
)
|
mu_target |
The boundary of the target alternative hypothesis space. |
mu_true |
The underlying mean of the data-generating distribution (default = |
mu_0 |
The boundary of the null hypothesis space. |
alpha |
The upper bound of the type-I error (default = |
beta |
The upper bound of the type-II error (default = |
B |
The number of the repeats of the simulation (default = |
print_progress |
A logical value. If |
print_result |
A logical value. If |
sample_generator |
R function to generate i.i.d. random samples. The function must take the number of samples |
power_fn |
R function to compute the power of the test given the sample size. The function must take the number of samples |
fixed_test_fn |
R function to conduct a fixed sample size test. The function must take the sample mean |
seq_test_fn |
R function to conduct sequential GLR-like and discrete mixture tests. The function must take the type-I error bound |
A list of simulation results and underlying settings.
Estimated probabilities of rejecting the null hypothesis.
Estimated average sample sizes of testing procedures.
Estimated probabilities of tests being stopped earlier than the fixed sample size test.
A list of vectors representing whether each test reject the null (1
) or not (0
) for each simulation run.
A list of numbers of samples used in each test.
The boundary of the target alternative hypothesis space.
The underlying mean of the data-generating distribution.
The boundary of the null hypothesis space.
The upper bound of the type-I error.
The upper bound of the type-II error.
1 | # For the example of the simulation, please check https://github.com/shinjaehyeok/SGLRT_paper.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.