n.weighted: Exact sample size; weighted mean-difference

Description Usage Arguments Value Examples

View source: R/mean_diff_weighted.R

Description

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.

Usage

1
n.weighted(alpha, theta1, theta2, density, sigma, pwr)

Arguments

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

Value

sample size in each group

Examples

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)

cpalmes/schuirmann.constant documentation built on Dec. 31, 2020, 10:07 p.m.