Skip to contents

Tools for blinded sample size re-estimation (BSSR) in two-arm clinical trials with binary endpoints, together with the exact power and sample size calculations the re-estimation relies on. Seven tests are supported, each available with a one-sided or a two-sided alternative. Two of them also test non-inferiority with a margin on the scale of the risk difference or the risk ratio, and the exact unconditional tests can be combined with the Berger-Boos procedure. The same calculations are available for matched-pairs designs, such as cross-over trials, with six tests based on the discordant pairs, and for designs stratified into two or more strata, with the Cochran-Mantel-Haenszel test, Cochran's test and the stratified exact conditional test.

Main functions

BinaryRR

Rejection region of an exact test

BinaryPower

Exact power at a given sample size

BinarySampleSize

Sample size attaining a target power

BinaryPowerBSSR

Power and final sample size of a BSSR design

BinaryTypeIErrorBSSR

Type I error rate of a BSSR design over the common response probability

BinaryAlphaAdjBSSR

Adjusted significance level that controls the type I error rate of a BSSR design

BinaryCondRejectBSSR

Rejection probabilities of a BSSR design given the pooled numbers of responders, and its type I error rate decomposed by the interim outcome

BinaryGridBSSR

Power and final sample size of several BSSR designs over common scenarios, as one data frame

BinaryBSSR

Sample size re-estimation from observed interim data

Paired binary data

PairedRR

Rejection region of a test for matched pairs

PairedPower

Exact power at a given number of pairs

PairedSampleSize

Number of pairs attaining a target power

PairedPowerBSSR

Power and final number of pairs of a re-estimation design

PairedBSSR

Re-estimation from the interim number of discordant pairs

PairedTypeIErrorBSSR

Type I error rate of a re-estimation design over the probability of a discordant pair

PairedAlphaAdjBSSR

Adjusted significance level of a re-estimation design

Stratified designs

StratRR

Critical values of a stratified test

StratPower

Exact power of a stratified test

StratSampleSize

Total sample size attaining a target power

StratPowerBSSR

Power and final sample size of a re-estimation design

StratGridBSSR

Power and final sample size of several re-estimation designs over common scenarios

StratBSSR

Re-estimation from the interim pooled numbers of responders of the strata

StratTypeIErrorBSSR

Type I error rate of a re-estimation design over the common response probabilities of the strata

StratAlphaAdjBSSR

Adjusted significance level of a re-estimation design with two strata

StratCondRejectBSSR

Conditional rejection probabilities of a re-estimation design with two strata, and its type I error rate decomposed by the interim outcome

Reuse of computed p-values

The p-values of a test over the outcome grid depend only on the sample sizes and the test, and a rejection region at any level follows from them by comparison. The functions of the package therefore compute each matrix of p-values once and keep it for the rest of the R session, which makes a second evaluation of a related design, or a search over the significance level, much faster than the first evaluation. The stored matrices are discarded when they would occupy more than about 100 MB, and options(bbssr.cache = FALSE) turns the reuse off. The results are the same either way.

Author

Maintainer: Gosuke Homma my.name.is.gosuke@gmail.com

Authors: