adjusted_alpha,Student-method {blindrecalc} | R Documentation |
Adjusted level of significance
Description
This method returns an adjusted significance level that can be used such that the actual type I error rate is preserved.
Usage
## S4 method for signature 'Student'
adjusted_alpha(
design,
n1,
nuisance,
recalculation,
tol,
iters = 10000,
seed = NULL,
...
)
Arguments
design |
Object of class |
n1 |
Either the sample size of the first stage (if
|
nuisance |
Value of the nuisance parameter. For the Student's t-test this is the variance. |
recalculation |
Should the sample size be recalculated after n1 patients are recruited? |
tol |
desired absolute tolerance |
iters |
Number of simulation iterations. |
seed |
Random seed for simulation. |
... |
Further optional arguments. |
Details
The method is only vectorized in either nuisance
or n1
.
In the case of the Student's t-test, the adjusted alpha is calculated using the algorithm by Kieser and Friede (2000): "Re-calculating the sample size in internal pilot study designs with control of the type I error rate". Statistics in Medicine 19: 901-911.
Value
Value of the adjusted significance level for every nuisance parameter and every value of n1.
Examples
d <- setupStudent(alpha = .025, beta = .2, r = 1, delta = 0, delta_NI = 1.5,
n_max = 848)
sigma <- c(2, 5.5, 9)
adjusted_alpha(design = d, n1 = 20, nuisance = sigma, recalculation = TRUE,
tol = 1e-4, iters = 1e3)