
bbssr: Blinded Sample Size Re-Estimation for Binary Endpoints
Source:R/bbssr-package.R
bbssr-package.RdTools 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
BinaryRRRejection region of an exact test
BinaryPowerExact power at a given sample size
BinarySampleSizeSample size attaining a target power
BinaryPowerBSSRPower and final sample size of a BSSR design
BinaryTypeIErrorBSSRType I error rate of a BSSR design over the common response probability
BinaryAlphaAdjBSSRAdjusted significance level that controls the type I error rate of a BSSR design
BinaryCondRejectBSSRRejection probabilities of a BSSR design given the pooled numbers of responders, and its type I error rate decomposed by the interim outcome
BinaryGridBSSRPower and final sample size of several BSSR designs over common scenarios, as one data frame
BinaryBSSRSample size re-estimation from observed interim data
Paired binary data
PairedRRRejection region of a test for matched pairs
PairedPowerExact power at a given number of pairs
PairedSampleSizeNumber of pairs attaining a target power
PairedPowerBSSRPower and final number of pairs of a re-estimation design
PairedBSSRRe-estimation from the interim number of discordant pairs
PairedTypeIErrorBSSRType I error rate of a re-estimation design over the probability of a discordant pair
PairedAlphaAdjBSSRAdjusted significance level of a re-estimation design
Stratified designs
StratRRCritical values of a stratified test
StratPowerExact power of a stratified test
StratSampleSizeTotal sample size attaining a target power
StratPowerBSSRPower and final sample size of a re-estimation design
StratGridBSSRPower and final sample size of several re-estimation designs over common scenarios
StratBSSRRe-estimation from the interim pooled numbers of responders of the strata
StratTypeIErrorBSSRType I error rate of a re-estimation design over the common response probabilities of the strata
StratAlphaAdjBSSRAdjusted significance level of a re-estimation design with two strata
StratCondRejectBSSRConditional 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:
Gosuke Homma my.name.is.gosuke@gmail.com