ruleF: Decision fule of the F design

View source: R/ruleF.R

ruleFR Documentation

Decision fule of the F design

Description

This is the function to determine the decision rule for the F design.

Usage

ruleF(alpha, beta, p1, p2, method, criterion, lambda = 1)

Arguments

alpha

Target type I error rate.

beta

Target type II error rate.

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.

method

"S", "M" or "W", denotes score test, Mann-Whitney-Wilcoxon test and win odds test respectively.

criterion

1: minimizing the expected total sample size under the null hypothesis, 2: minimizing the expected total sample size under the alternative hypothesis, 3: minimizing the expected total sample size assuming that Pr(H0) = Pr(Ha), 4: balancing sample sizes of the two stages prioritizing EN0, 5: balancing sample sizes of the two stages prioritizing maximum sample size n2.

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

method

Statistical test chosen.

criterion

Criterion chosen.

n1

The total sample size of the control and experimental groups required at the 1st analysis.

t1

The threshold of the test statistic at the 1st analysis.

n2

The cumulative total sample size of the control and experimental groups required at the 2nd analysis.

t2

The threshold of the test statistic at the 2nd analysis.

Examples

alpha = 0.05; beta = 0.2; 
p1 = c(0.2, 0.5, 0.2, 0.1)
p2 = c(0.4, 0.3, 0.2, 0.1)
ruleF(alpha, beta, p1, p2, method="M", criterion="1", lambda = 1)

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