Description Usage Arguments Value Examples
View source: R/mean_diff_weighted.R
Exact sample size calculation of a balanced, unpaired TOST, where the true mean-difference follows a prescribed a-priori distribution. The lowest sample size n that exceeds the target power pwd is calculated using a standard binary search algorithm. The result n is the sample size in one group.
1 | n.weighted(alpha, theta1, theta2, density, sigma, pwr)
|
alpha |
type I error |
theta1 |
lower limit of equivalence interval |
theta2 |
upper limit of equivalence interval |
density |
a-priori density for the mean-difference |
sigma |
standard deviation of the measurements |
pwr |
Exact power of the TOST |
sample size in each group
1 2 3 | rho <- apriori.density('U')
pwr <- power.weighted(alpha = 0.05, theta1 = -2, theta2 = 2, density = rho, sigma = 1, n = 22)
n.weighted(alpha = 0.05, theta1 = -2, theta2 = 2, density = rho, sigma = 1, pwr = pwr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.