Decision_rule_S_1stage: One-stage clinical trial design based on the score test

View source: R/Decision_rule_S_1stage.R

Decision_rule_S_1stageR Documentation

One-stage clinical trial design based on the score test

Description

This is the function to determine the decision rule for a one-stage clinical trial designs based on the score test.

Usage

Decision_rule_S_1stage(p1, p2, alpha, beta, lambda = 1)

Arguments

p1

A vector containing the probabilities of the outcome falling into each level of the control arm.

p2

A vector containging the probabilities of the outcome falling into each level of the control arm.

alpha

Target type I error rate.

beta

Target type II error rate.

lambda

The ratio of sample sizes between the experimental and control groups, defined as sample size (experimental): sample size (control) = lambda:1. The default value is 1.

Value

n2

The total sample size at the final analysis including both the control and experimental groups.

t2

The threshold of the test statistic at the analysis.

References

Park, Y. (2025). Optimal two-stage group sequential designs based on Mann-Whitney-Wilcoxon test. PloS one, 20(2), e0318211.

Examples

alpha = 0.05; beta = 0.2; or = 3.06
p1 = c(0.075, 0.182, 0.319, 0.243, 0.015, 0.166)  # control prob
p2 = p2_fun(p1, log(or))  # experimental prob
p2
Decision_rule_S_1stage(p1, p2, alpha, beta, lambda = 1)

OptOTrials documentation built on Sept. 9, 2025, 5:46 p.m.