Learn R Programming

PowerUpR (version 1.0.1)

ira1r1: Individual-level Random Assignment Design

Description

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

Usage

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

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

mrss.ira1r1(es=.25, power=.80, alpha=.05, two.tailed=TRUE, n0=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

proportion of units randomly assigned to treatment.

g1

number of covariates.

r21

proportion of variance in the outcome explained by covariates.

n

sample size.

n0

starting value for n.

tol

tolerance to end iterative process for finding n.

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.

n

sample size.

See Also

power.ird1r1

Examples

Run this code
# NOT RUN {
# cross-checks
mdes.ira1r1(n=250)
power.ira1r1(es=.356, n=250)
mrss.ira1r1(es=.356)
# }

Run the code above in your browser using DataLab