Learn R Programming

TOSTER (version 0.3.4)

powerTOSTtwo: Power analysis for TOST for independent t-test (Cohen's d).

Description

Power analysis for TOST for independent t-test (Cohen's d).

Usage

powerTOSTtwo(alpha, statistical_power, N, low_eqbound_d, high_eqbound_d)

Arguments

alpha

alpha used for the test (e.g., 0.05)

statistical_power

desired power (e.g., 0.8)

N

sample size per group (e.g., 108)

low_eqbound_d

lower equivalence bounds (e.g., -0.5) expressed in standardized mean difference (Cohen's d)

high_eqbound_d

upper equivalence bounds (e.g., 0.5) expressed in standardized mean difference (Cohen's d)

Value

Calculate either achieved power, equivalence bounds, or required N, assuming a true effect size of 0. Returns a string summarizing the power analysis, and a numeric variable for number of observations, equivalence bounds, or power.

References

Chow, S.-C., Wang, H., & Shao, J. (2007). Sample Size Calculations in Clinical Research, Second Edition - CRC Press Book. Formula 3.2.4 with k = 1

Examples

Run this code
# NOT RUN {
## Sample size for alpha = 0.05, 80% power, equivalence bounds of
## Cohen's d = -0.4 and Cohen's d = 0.4, assuming true effect = 0
powerTOSTtwo(alpha=0.05, statistical_power=0.8, low_eqbound_d=-0.4, high_eqbound_d=0.4)

## Statistical power for alpha = 0.05, N = 108 per group, equivalence bounds of
## Cohen's d = -0.4 and Cohen's d = 0.4, assuming true effect = 0
powerTOSTtwo(alpha=0.05, N=108, low_eqbound_d=-0.4, high_eqbound_d=0.4)

## Equivalence bounds for alpha = 0.05, N = 108 per group, statistical power of
## 0.8, assuming true effect = 0
powerTOSTtwo(alpha=0.05, N=108, statistical_power=0.8)
# }

Run the code above in your browser using DataLab