powered by
Computes the type I error rate of designs with blinded sample size recalculation or of fixed designs for one or several values of the nuisance parameter.
# S4 method for Student toer( design, n1, nuisance, recalculation = TRUE, iters = 10000, seed = NULL, allocation = c("approximate", "exact"), ... )
One type I error rate value for every nuisance parameter and every value of n1.
Object of class Student created by setupStudent.
Student
setupStudent
Either the sample size of the first stage (if recalculation = TRUE or the toal sample size (if recalculation = FALSE).
recalculation = TRUE
recalculation = FALSE
Value of the nuisance parameter. For the Student's t-test this is the variance.
Should the sample size be recalculated after n1 patients are recruited?
Number of simulation iterations.
Random seed for simulation.
Whether the allocation ratio should be preserved exactly (exact) or approximately (approximate).
exact
approximate
Further optional arguments.
The method is only vectorized in either nuisance or n1.
nuisance
n1
d <- setupStudent(alpha = .025, beta = .2, r = 1, delta = 3.5, delta_NI = 0, alternative = "greater", n_max = 156) toer(d, n1 = 20, nuisance = 5.5, recalculation = TRUE)
Run the code above in your browser using DataLab