Description Usage Arguments Value Examples
View source: R/mean_diff_weighted.R
Calculates the exact power of an unpaired, balanced TOST with n samples in each group, where the true mean-difference is modeled with an a-priori density rather than a fixed mean-difference. The calculation is performed in the TOST sensitivity parameterization.
1 | power.weighted.nabla(alpha, density, nabla, n)
|
alpha |
type I error |
density |
a-priori density for the mean-difference |
nabla |
TOST sensitivity index |
n |
sample size in each group |
Exact power of the TOST for a weighted mean-difference
1 2 3 4 5 6 7 | rho <- apriori.density('U')
power.weighted.nabla(alpha = 0.05, density = rho, nabla = 8, n = 22)
## Since we are performing a weighted power calculation, the r respectively
## theta0 value is not needed. Thus, the following calculation does not depend
## on r.
l <- nabla.to.standard(r = 0.99, nabla = 8, theta1 = -1, theta2 = 4, n = 22)
power.weighted(alpha = 0.05, theta1 = -1, theta2 = 4, density = rho, sigma = l$sigma, n = 22)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.