Learn R Programming

MIDN (version 1.0)

fisher_boschloo_midN: Nearly exact sample size calculation for the Fisher-Boschloo test for differences between independent binomial proportions

Description

The function computes the exact sample sizes required in the randomized UMPU test and its conservative nonrandomized version for attaining prespecified power. In a final step, the mean of both quantities is output as an nearly exact value required in the Fisher-Boschloo test, a powerful nonrandomized version of the exact Fisher-type test.

Usage

fisher_boschloo_midN(alpha, SW, p1, p2, POWO, mton_a, mton_b)

Arguments

alpha
target significance level
SW
step width for increasing p2 in the search for the size of a given critical region in the sample space of (X,Y)
p1
true value of the responder rate for Population 1
p2
true value of the responder rate for Population 2
POWO
power to be obtained against the alternative (p1,p2)
mton_a
desired ratio of sample sizes: numerator
mton_b
desired ratio of sample sizes: denominator

Value

References

Wellek S: Nearly exact sample size calculation for powerful nonrandomized tests for differences between binomial proportions. Statistica Neerlandica 69 (2015), 358-373.

Examples

Run this code

result1 <- fisher_boschloo_midN(0.025,0.0001,0.95,0.8,0.8,2,1)
POWEX <- result1[5]
result1  # shows values of vector result1
POWEX    # shows value of POWEX

Run the code above in your browser using DataLab