Learn R Programming

PowerUpR (version 1.0.1)

bira2f1: Two-Level Blocked (Fixed Treatment Effect) Individual-level Random Assignment Design, Treatment at Level 1

Description

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

Usage

mdes.bira2f1(power=.80, alpha=.05, two.tailed=TRUE,
             p=.50, g1=0, r21=0, n, J)

power.bira2f1(es=.25, alpha=.05, two.tailed=TRUE, p=.50, g1=0, r21=0, n, J)

mrss.bira2f1(es=.25, power=.80, alpha=.05, two.tailed=TRUE, n, J0=10, tol=.10, p=.50, g1=0, r21=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.

p

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

g1

number of covariates at level 1.

r21

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

n

harmonic mean of level 1 units across level 2 units (or simple average).

J

level 2 sample size.

J0

starting value for J.

tol

tolerance to end iterative process for finding J.

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.

J

number of level 2 units.

Examples

Run this code
# NOT RUN {
# cross-checks
mdes.bira2f1(n=15, J=20)
power.bira2f1(es=.325, n=15, J=20)
mrss.bira2f1(es=.325, n=15)
# }

Run the code above in your browser using DataLab