powerTOSTtwo.Rd
Power analysis for TOST for independent t-test (Cohen's d). This function is no longer maintained please use power_t_TOST.
powerTOSTtwo(alpha, statistical_power, N, low_eqbound_d, high_eqbound_d)
powerTOSTtwo.raw(
alpha,
statistical_power,
N,
sdpooled,
low_eqbound,
high_eqbound,
delta = 0
)
alpha used for the test (e.g., 0.05)
desired power (e.g., 0.8)
sample size per group (e.g., 108)
lower equivalence bounds (e.g., -0.5) expressed in standardized mean difference (Cohen's d)
upper equivalence bounds (e.g., 0.5) expressed in standardized mean difference (Cohen's d)
specify the pooled standard deviation
lower equivalence bounds (e.g., -0.5) expressed in raw scale units (e.g., scalepoints)
upper equivalence bounds (e.g., 0.5) expressed in raw scale units (e.g., scalepoints)
hypothesized true value for the difference between the 2 means. Default is zero.
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.
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
## 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)
#> Warning: `powerTOSTtwo()` was deprecated in TOSTER 0.4.0.
#> ℹ Please use `power_t_TOST()` instead.
#> The required sample size to achieve 80 % power with equivalence bounds of -0.4 and 0.4 is 108 per group, or 216 in total.
#>
#> [1] 107.0481
## 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)
#> The statistical power is 80.45 % for equivalence bounds of -0.4 and 0.4 .
#>
#> [1] 0.8045235
## 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)
#> The equivalence bounds to achieve 80 % power with N = 108 are -0.4 and 0.4 .
#>
#> [1] -0.3982333 0.3982333
## Sample size for alpha = 0.05, 80% power, equivalence bounds of -200 and 200 in raw
## units, assuming pooled standard deviation of 350, and assuming true effect = 0
powerTOSTtwo.raw(alpha=0.05,statistical_power=0.8,low_eqbound=-200,high_eqbound=200,sdpooled=350)
#> Warning: `powerTOSTtwo.raw()` was deprecated in TOSTER 0.4.0.
#> ℹ Please use `power_t_TOST()` instead.
#> The required sample size to achieve 80 % power with equivalence bounds of -200 and 200 is 52.45357 per group, or 106 in total.
#>
#> [1] 52.45357
## Power for alpha = 0.05, N = 53 per group, equivalence bounds of
## -200 and 200 in raw units, assuming sdpooled = 350 and true effect = 0
powerTOSTtwo.raw(alpha=0.05, N=53, low_eqbound=-200, high_eqbound=200, sdpooled=350)
#> The statistical power is 80.53 % for equivalence bounds of -200 and 200 .
#>
#> [1] 0.805289
## Equivalence bounds for alpha = 0.05, N = 108 per group, statistical power of
## 0.8, assuming true effect = 0
powerTOSTtwo.raw(alpha=0.05, N=53, statistical_power=0.8, sdpooled=350)
#> The equivalence bounds to achieve 80 % power with N = 53 are -198.97 and 198.97 .
#>
#> [1] -198.9663 198.9663