BinaryRR {bbssr}R Documentation

Rejection Region for Two-Arm Trials with Binary Endpoints

Description

Provides a rejection region (RR) for two-arm trials with binary endpoints using various exact statistical tests. The function supports five different one-sided tests.

Usage

BinaryRR(N1, N2, alpha, Test)

Arguments

N1

Sample size for group 1

N2

Sample size for group 2

alpha

One-sided level of significance

Test

Type of statistical test. Options: 'Chisq', 'Fisher', 'Fisher-midP', 'Z-pool', or 'Boschloo'

Details

The function supports the following five one-sided tests:

Value

A logical matrix representing the rejection region (RR). Matrix dimensions are (N1+1) x (N2+1), where TRUE indicates rejection of the null hypothesis.

Author(s)

Gosuke Homma (my.name.is.gosuke@gmail.com)

Examples

# Simple example with small sample sizes (runs quickly)
N1 <- 5
N2 <- 5
alpha <- 0.025
Test <- 'Chisq'
RR <- BinaryRR(N1, N2, alpha, Test)
print(dim(RR))  # Should be (6, 6)


# More computationally intensive example
N1 <- 20
N2 <- 10
alpha <- 0.025
Test <- 'Boschloo'
RR <- BinaryRR(N1, N2, alpha, Test)
print(RR)



[Package bbssr version 1.0.2 Index]