n_dist {blindrecalc}R Documentation

Distribution of the Sample Size

Description

Calculates the distribution of the total sample sizes of designs with blinded sample size recalculation for different values of the nuisance parameter or of n1.

Usage

n_dist(design, n1, nuisance, summary = TRUE, plot = FALSE, ...)

Arguments

design

object of class TestStatistic created by setup

n1

total number of patients that are recruited before the sample size is recalculated

nuisance

nuisance parameter that is estimated at the interim analysis

summary

logical - is a summary of the sample size distribution desired? Otherwise, a vector with sample sizes is returned.

plot

Should a plot of the sample size distribution be drawn?

...

Further optional arguments.

Details

The method is only vectorized in either nuisance or n1.

The method is implemented for the classes Student, ChiSquare, and FarringtonManning.

Value

Summary and/or plot of the sample size distribution for every nuisance parameter and every value of n1.

Examples

d <- setupStudent(alpha = .025, beta = .2, r = 1, delta = 3.5, delta_NI = 0,
                  alternative = "greater", n_max = 156)
n_dist(d, n1 = 20, nuisance = 5.5, summary = TRUE, plot = FALSE, seed = 2020)



[Package blindrecalc version 1.0.1 Index]