Learn R Programming

PowerUpR (version 1.0.1)

bira3r1: Three-Level Blocked Individual-level Random Assignment Design, Treatment at Level 1

Description

Use mdes.bira3r1() to calculate minimum detectable effect size, power.bira3r1() to calculate statistical power, and mrss.bira3r1() to calculate minimum required sample size.

Usage

mdes.bira3r1(power=.80, alpha=.05, two.tailed=TRUE,
             rho2, rho3, omega2, omega3,
             p=.50, r21=0, r2t2=0, r2t3=0, g3=0,
             n, J, K)

power.bira3r1(es=.25, alpha=.05, two.tailed=TRUE, rho2, rho3, omega2, omega3, p=.50, r21=0, r2t2=0, r2t3=0, g3=0, n, J, K)

mrss.bira3r1(es=.25, power=.80, alpha=.05, two.tailed=TRUE, n, J, K0=10, tol=.10, rho2, rho3, omega2, omega3, p=.50, r21=0, r2t2=0, r2t3=0, g3=0)

Arguments

power

statistical power \((1-\beta)\).

es

effect size.

alpha

probability of type I error.

two.tailed

logical; TRUE for two-tailed hypothesis testing, FALSE for one-tailed hypothesis testing.

rho2

proportion of variance in the outcome between level 2 units (unconditional ICC2).

rho3

proportion of variance in the outcome between level 3 units (unconditional ICC3).

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.

p

average proportion of level 1 units randomly assigned to treatment within level 2 units.

g3

number of covariates at level 3.

r21

proportion of level 1 variance in the outcome explained by level 1 covariates.

r2t2

proportion of treatment effect variance among level 2 units explained by level 2 covariates.

r2t3

proportion of treatment effect variance among level 3 units explained by level 3 covariates.

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

number of level 3 units.

K0

starting value for K.

tol

tolerance to end iterative process for finding K.

Value

fun

function name.

parms

list of parameters used in power calculation.

df

degrees of freedom.

ncp

noncentrality parameter.

power

statistical power \((1-\beta)\).

mdes

minimum detectable effect size.

K

number of level 3 units.

See Also

cosa.bird3r1

Examples

Run this code
# NOT RUN {
# cross-checks
mdes.bira3r1(rho3=.20, rho2=.15,
             omega3=.10, omega2=.10,
             n=69, J=10, K=100)
power.bira3r1(es = .045, rho3=.20, rho2=.15,
              omega3=.10, omega2=.10,
              n=69, J=10, K=100)
mrss.bira3r1(es = .045, rho3=.20, rho2=.15,
             omega3=.10, omega2=.10,
             n=69, J=10)
# }

Run the code above in your browser using DataLab