mrss.bcra4r2
calculates minimum required sample size (MRSS) for designs with 4-levels
where level 2 units are randomly assigned to treatment and control groups within level 3 units (random blocks).mrss.bcra4r2(mdes=.25, power=.80, alpha=.05, two.tail=TRUE,
gm=2, ncase=10, constrain="power",
n=NULL, J=NULL, K=NULL, L=NULL, L0=10, tol=.10,
rho2, rho3, rho4, omega3, omega4,
P=.50, R12=0, R22=0, RT32=0, RT42=0, g4=0)
TRUE
for two-tailed hypothesis testing, FALSE
for one-tailed hypothesis testing."cost"
, "power"
, or "mdes"
.round.mrss
solution.L
) is calculated
using an iterative procedure described in Dong & Maynard (2013) due to degrees of freedom dependency on L
.
For other levels (n
, J
and K
) MRSS calculation is simply solving for the unknown.
MRSS calculator returns values that are not integer. Rounding may produce
MDES and power values different from what was specified,
therefore an integer solution is approximated using brute force (See Value section).
Integer solution to MRSS for an omitted level assumes that specified sample sizes
for remaining levels may subject to some changes. Further definition of design parameters can be found in Dong & Maynard (2013).mdes.bcra4r2, power.bcra4r2, optimal.bcra4r2
## Not run: ------------------------------------
#
# mrss.bcra4r2(rho4=.05, rho3=.15, rho2=.15,
# omega4=.50, omega3=.50, omega2=.50,
# n=10, J=2, K=10)
#
#
## ---------------------------------------------
Run the code above in your browser using DataLab