
Two One-Sided Tests (TOST) for (Bio)Equivalence Assessment
Source:R/internal_average_univariate.R
tost.RdPerforms the Two One-Sided Tests (TOST) procedure for (bio)equivalence assessment in both univariate and multivariate settings.
Arguments
- theta
A
numericvalue or vector representing the estimated difference(s) (e.g., between a generic and reference product).- sigma
A
numericvalue (univariate) ormatrix(multivariate) corresponding to the estimated variance oftheta.- nu
A
numericvalue specifying the degrees of freedom. In the multivariate case, it is assumed to be the same across all dimensions.- delta
A
numericvalue or vector defining the (bio)equivalence margin(s). The procedure assumes symmetry, i.e., the (bio)equivalence region is \((-\delta, \delta)\). In the multivariate case, it is assumed to be the same across all dimensions.- alpha
A
numericvalue specifying the significance level (default:alpha = 0.05).- ...
Additional arguments.
Value
A tost object with the following elements:
decision: Logical; indicates whether (bio)equivalence is accepted.ci: Confidence region at the \(1 - 2\alpha\) level.theta: The estimated difference(s) used in the test.sigma: The estimated variance oftheta; anumericvalue (univariate) ormatrix(multivariate).nu: The degrees of freedom used in the test.alpha: The significance level used in the test.delta: The (bio)equivalence limits used in the test.method: A character string describing the method used ("TOST").setting: The setting used ("univariate" or "multivariate").
Examples
# Univariate case
data(skin)
theta_hat = diff(colMeans(skin))
nu = nrow(skin) - 1
sig_hat = sd(apply(skin, 1, diff)) / sqrt(nu)
tost(theta = theta_hat, sigma = sig_hat, nu = nu,
alpha = 0.05, delta = log(1.25))
#> Error in tost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25)): could not find function "tost"
# Multivariate case
data(ticlopidine)
n = nrow(ticlopidine)
nu = n - 1
theta_hat = colMeans(ticlopidine)
Sigma_hat = cov(ticlopidine) / n
tost(theta = theta_hat, sigma = Sigma_hat, nu = nu, delta = log(1.25))
#> Error in tost(theta = theta_hat, sigma = Sigma_hat, nu = nu, delta = log(1.25)): could not find function "tost"