Description Usage Arguments Details Value Author(s)
Computes the conditional type I error rate of a pre-planned permutation test in a two-stage adaptive design. We condition on the observed first stage data and treatment assignment as well as the observed second stage data - which we assume are obtained when the experiment reaches its preplanned sample size.
1 2 3 |
x1 |
vector of preplanned first stage observations |
g1 |
vector of first stage treatment assignments |
x2 |
vector of preplanned second stage observations |
stat |
function computing the test statistic (see Details) |
permutations |
number of permutations (rerandomizations) used to compute unconditional and conditional permutation distributions |
alpha |
pre-fixed significance level |
g2 |
template vector for second stage treatment assignments |
restricted |
|
... |
additional options to |
each |
Based on the first stage data and treatment assignments one may perform sample size reassassment - and possibly other trial modifications - as long as the (preplanned) second stage sample size is not reduced.
stat
needs to be a function of the form function(x,g,...)
returning a numeric of length one. Possible options are sumdiff
, meandiff
, zstat
For the moment, we assume that observations are randomized using random allocation blocked by stages, (i.e. we resample using sample (g1)
). g2
does not have to be the actual second stage treatment assignments but just one possible example randomization, that fixes the treatment group sizes.
numeric value of the conditional error rate
Florian Klinglmueller
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.