Calculates the sample sizes for a study designed to test the difference between the means of two groups,
where a proportion of those randomized to the control regimin switch to the treatment regimin (rho0)
and a proportion of those randomized to the treatment regimin switch to the control regimin (rho1).You must supply either mu0
and mu1
or delta
=mu0-mu1.
The one-sided tests are designed to test either
$H0: delta <= deltab$="" vs.="" $h1:="" delta=""> deltaB$ or to test
$H0: delta >= deltaB$ vs.
$H1: delta < deltaB$.
The choice of hypotheses is determined by the value of delta
;
if delta
$>$ deltaB
then the former hypotheses are tested, otherwise the latter are.=>
The responses may be continuous, discrete, or even binary.
The value refinement
defines different methods related to the response type.
When refinement=NULL, the method is based on asymptotic normal approximation.
For refinement='Normal' the method is based on the t-distribution derived when the responses are normal.
For refinement='Bernoulli' the sigma0.sq
and var.ratio
values are defined by
mu0
and mu1
, and the sample sizes do not use any continuity correction.
For refinement='Fisher.exact' only the two-sided alternative is allowed and the sample size related to
exact powers for the 2X2 Fisher exact test are calculated.
See Fay, Halloran and Follmann (2007) for details.