Learn R Programming

BayesianHybridDesign (version 0.1.0)

fisher.bound: Calculate Rejection Boundary for Fisher's Exact Test

Description

For a given control group response rate and sample sizes, this function finds the smallest number of responders in the experimental arm (rt) that achieves statistical significance based on a one-sided Fisher's exact test.

Usage

fisher.bound(pc, nc, nt, alpha = 0.1)

Value

A list containing the following components:

M

The 2x2 contingency table at the boundary.

p

The p-value corresponding to the boundary.

rc

The number of responders in the control arm, calculated as round(nc * pc).

nc

The sample size of the control arm.

rt

The smallest number of responders in the experimental arm that achieves a p-value <= alpha.

nt

The sample size of the experimental arm.

delta

The minimum detectable difference in response rates (rt/nt - rc/nc).

Arguments

pc

A scalar numeric. The response rate for the control arm.

nc

A scalar integer. The number of subjects in the control arm.

nt

A scalar integer. The number of subjects in the experimental arm.

alpha

A scalar numeric. The one-sided p-value threshold for statistical significance. Default is 0.1.

Examples

Run this code
fisher.bound(pc=0.3, nc=40, nt=40, alpha=0.1)

Run the code above in your browser using DataLab