View source: R/Decision_rule_S.FS.R
Decision_rule_S.FS | R Documentation |
This is the function to determine the decision rule for the FS design based on the score test with the specified values of alpha1, alpha2, and beta1.
Decision_rule_S.FS(p1, p2, alpha1, alpha2, beta1, alpha, beta, lambda = 1)
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. |
alpha1 |
The parameter used to define futility monitoring. Under the null hypothesis, 1 - alpha1 corresponds to the probability of stopping for futility at the interim analysis. |
alpha2 |
The probability of stopping for superiority at the interim analysis when the null hypothesis is true. |
beta1 |
The probability of stopping for futility at the interim analysis when the alternative hypothesis is true. |
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. |
n1 |
The total sample size of the control and experimental groups required at the 1st analysis. |
t1l |
The lower threshold of the test statistic at the 1st analysis. |
t1u |
The upper 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. |
beta2 |
Under the null hypothesis, 1 - beta2 denotes the probability of stopping for superiority at the interim analysis. |
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
alpha1 <- 0.2
alpha2 <- 0.025
beta1 <- 0.1
Decision_rule_S.FS(p1, p2, alpha1, alpha2, beta1, alpha, beta, lambda = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.