Learn R Programming

PowerUpR (version 0.1.2)

mrss.bira4r1: Model 2.5: MRSS Calculator for 4-Level Random Effects Blocked Individual Random Assignment Design, Individuals Randomized within Blocks

Description

mrss.bira4r1 calculates minimum required sample size (MRSS) for designs with 4-levels where level 1 units are randomly assigned to treatment and control groups within level 2 units (random blocks).

Usage

mrss.bira4r1(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, omega2, omega3, omega4, P=.50, R12=0, RT22=0, RT32=0, RT42=0, g4=0)

Arguments

mdes
minimum detectable effect size.
power
statistical power (1 - type II error).
alpha
probability of type I error.
two.tail
logical; TRUE for two-tailed hypothesis testing, FALSE for one-tailed hypothesis testing.
gm
grid multiplier to increase the range of sample size search for each level.
ncase
number of cases to show in the output.
constrain
parameter to constrain; "cost", "power", or "mdes".
n
harmonic mean of level 1 units across level 2 units (or simple average).
J
harmonic mean of level 2 units across level 3 units (or simple average).
K
harmonic mean of level 3 units across level 3 units (or simple average).
L
number of level 4 units.
L0
starting value for estimating number of level 4 units.
tol
tolerance to stop the search algorithm.
rho2
proportion of variance in the outcome explained by level 2 units.
rho3
proportion of variance in the outcome explained by level 3 units.
rho4
proportion of variance in the outcome explained by level 4 units.
omega2
treatment effect heterogeneity as ratio of treatment effect variance among level 2 units to the residual variance at level 2.
omega3
treatment effect heterogeneity as ratio of treatment effect variance among level 3 units to the residual variance at level 3.
omega4
treatment effect heterogeneity as ratio of treatment effect variance among level 4 units to the residual variance at level 4.
P
average proportion of level 1 units randomly assigned to treatment within level 2 units.
g4
number of covariates at level 4.
R12
proportion of level 1 variance in the outcome explained by level 1 covariates.
RT22
proportion of treatment effect variance among level 2 units explained by level 2 covariates.
RT32
proportion of treatment effect variance among level 3 units explained by level 3 covariates.
RT42
proportion of treatment effect variance among level 4 units explained by level 4 covariates.

Value

Details

Level 4 sample size (L) is calculated using an iterative procedure described in Dong & Maynard (2013) due to model 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).

References

Dong & Maynard (2013). PowerUp!: A Tool for Calculating Minum Detectable Effect Sizes and Minimum Required Sample Sizes for Experimental and Quasi-Experimental Design Studies,Journal of Research on Educational Effectiveness, 6(1), 24-6.

See Also

mdes.bira4r1, power.bira4r1, optimal.bira4r1

Examples

Run this code
## Not run: 
# 
#      mrss.bira4r1(rho4=.05, rho3=.15, rho2=.15,
#                  omega4=.50, omega3=.50, omega2=.50,
#                  n=10, J=2, K=10)
# 
#   ## End(Not run)

Run the code above in your browser using DataLab