Type: Package
Title: Finite Sample Correction of the Two One-Sided Tests in the Univariate Framework
Version: 1.0.1
Maintainer: Younes Boulaguiem <younes.boulaguiem@gmail.com>
Description: A system containing easy-to-use tools to compute the bioequivalence assessment in the univariate framework using the methods proposed in Boulaguiem et al. (2023) <doi:10.1101/2023.03.11.532179>.
Depends: PowerTOST, cli, knitr, R (≥ 4.0)
Imports: rmarkdown
Suggests: asciicast
License: AGPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
VignetteBuilder: knitr
URL: https://github.com/yboulag/cTOST
BugReports: https://github.com/yboulag/cTOST/issues
NeedsCompilation: no
Packaged: 2025-02-10 11:03:02 UTC; yobo19
Author: Younes Boulaguiem [aut, cre, cph], Stéphane Guerrier [aut, cph], Dominique-Laurent Couturier [aut, cph]
Repository: CRAN
Date/Publication: 2025-02-10 11:20:05 UTC

Get Corrected Level

Description

This function applies the alpha-TOST corrective procedure to obtain the corrected level.

Usage

alphahat.fun(sigma, nu, alpha, delta, tol = 1e-07)

Arguments

sigma

A numeric value corresponding to the standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

alpha

A numeric value specifying the significance level.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

tol

A numeric value corresponding to the tolerance to be applied during the optimization (see 'optim')

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier


The alpha-TOST Corrective Procedure for (Bio)Equivalence Testing

Description

This functions is used to compute the alpha-TOST, a corrective procedure of the significance level applied to the Two One-Sided Test (TOST) for (bio)equivalence testing in the univariate framework.

Usage

atost(theta, sigma, nu, alpha, delta)

Arguments

theta

A numeric value corresponding to the difference of means.

sigma

A numeric value corresponding to the standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

alpha

A numeric value specifying the significance level.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

Value

A tost object with the structure:

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier

Examples

data(skin)

theta_hat = diff(apply(skin,2,mean))
nu = nrow(skin) - 1
sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
res_atost = atost(theta = theta_hat, sigma = sig_hat, nu = nu,
              alpha = 0.05, delta = log(1.25))
res_atost
compare_to_tost(res_atost)


Confidence Intervals

Description

Confidence Intervals

Usage

ci(alpha, theta, sigma_nu, nu, ...)

Arguments

alpha

A numeric value specifying the significance level (default = 0.05).

theta

A numeric value corresponding to the estimated parameter of interest (such as a difference of means).

sigma_nu

A numeric value corresponding to the estimated standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

...

Additional parameters.

Value

The function returns a numerical vector with the lower and upper bound of the confidence intervals.

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier


Comparison of a Corrective Procedure to the results of the Two One-Sided Tests (TOST)

Description

This function renders a comparison of the alpha-TOST or the delta-TOST outputs obtained with the functions 'atost' or 'dtost', respectively, to the TOST output obtained with 'tost'.

Usage

compare_to_tost(x, ticks = 30, rn = 5)

Arguments

x

A tost object, which is the output of one of the following functions: 'atost' or 'dtost'.

ticks

an integer indicating the number of segments that will be printed to represent the confidence intervals.

rn

integer indicating the number of decimals places to be used (see function 'round') for the printed results.

Value

Pints a comparison between the TOST results (i.e., output of 'tost') and either the alpha-TOST or the delta-TOST results (i.e., outputs of 'atost' or 'dtost', respectively).


Get Corrected (Bio)Equivalence Bounds

Description

This function applies the delta-TOST corrective procedure to obtain the corrected (bio)equivalence bounds

Usage

deltahat.fun(sigma, alpha, delta, nu)

Arguments

sigma

A numeric value corresponding to the standard error.

alpha

A numeric value specifying the significance level.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

nu

A numeric value corresponding to the number of degrees of freedom.


The delta-TOST Corrective Procedure for (Bio)Equivalence Testing

Description

This functions is used to compute the delta-TOST, a corrective procedure of the (bio)equivalence bounds applied to the Two One-Sided Test (TOST) for (bio)equivalence testing in the univariate framework.

Usage

dtost(theta, sigma, nu, alpha, delta)

Arguments

theta

A numeric value corresponding to the difference of means.

sigma

A numeric value corresponding to the standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

alpha

A numeric value specifying the significance level.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

Value

A tost object with the structure:

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier

Examples

data(skin)

theta_hat = diff(apply(skin,2,mean))
nu = nrow(skin) - 1
sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
res_dtost = dtost(theta = theta_hat, sigma = sig_hat, nu = nu,
              alpha = 0.05, delta = log(1.25))
res_dtost
compare_to_tost(res_dtost)


Get alpha star

Description

Get alpha star

Usage

get_alpha_star(alpha, sigma_nu, nu, delta, ...)

Arguments

alpha

A numeric value specifying the significance level (default = 0.05).

sigma_nu

A numeric value corresponding to the estimated standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

...

Additional parameters.

Value

The function returns a numeric value that corresponds to the solution of the optimisation.

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier


Objective function to optimise

Description

Objective function to optimise

Usage

obj_fun_alpha_star(test, alpha, sigma_nu, nu, delta, ...)

Arguments

test

A numeric value specifying the significance level to optimise.

alpha

A numeric value specifying the significance level (default = 0.05).

sigma_nu

A numeric value corresponding to the estimated standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

...

Additional parameters.

Value

The function returns a numeric value for the objective function.

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier


Objective Function of the delta-TOST Corrective Procedure

Description

Objective Function of the delta-TOST Corrective Procedure

Usage

obj_fun_delta_hat(delta_star, sigma, alpha, delta, nu)

Arguments

delta_star

The (bio)equivalence bound parameter to be optimized.

sigma

The considered standard error.

alpha

The nominal level for the test.

delta

The (bio)equivalence bound used for the TOST decision.

nu

The degrees of freedom parameter.


Power function

Description

Power function

Usage

power_TOST(alpha, theta, sigma, nu, delta, ...)

Arguments

alpha

A numeric value specifying the significance level (default = 0.05).

theta

A numeric value corresponding to the estimated parameter of interest (such as a difference of means).

sigma

A numeric value corresponding to the estimated standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

...

Additional parameters.

Value

The function returns a numeric value that corresponds to a probability.

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier


Print Results of (Bio)Equivalence Assessment

Description

Print Results of (Bio)Equivalence Assessment

Usage

## S3 method for class 'tost'
print(x, ticks = 30, rn = 5, ...)

Arguments

x

A tost object, which is the output of one of the following functions 'tost', 'atost' or 'dtost'.

ticks

Number of ticks to print the confidence interval in the console.

rn

Number of digits to consider when printing the results.

...

Further arguments to be passed to or from methods.

Value

Prints object.


The size

Description

The size

Usage

size_TOST(alpha, sigma_nu, nu, delta, ...)

Arguments

alpha

A numeric value specifying the significance level (default = 0.05).

sigma_nu

A numeric value corresponding to the estimated standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

...

Additional parameters.

Value

The function returns a numeric value that corresponds to a probability.

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier


Log transformed cutaneous delivery of econazole (ECZ) from bioequivalent products on porcine skin

Description

Original data were collected in the same way as described in Quariter et. al. (2019), and represents cutaneous delivery of econazole nitrate (ECZ in ng/cm^2) on porcine skin from a reference medicinal product and an approved bioequivalent product. The dataset contains 17 pairs of comparable porcine skin samples on which measurement of ECZ deposition was gathered, and log transformed, using both creams.

Usage

data(skin)

Format

A 'data.frame' with 16 rows and 2 columns:

Reference

Econazole nitrate delivery for the reference product.

Generic

Econazole nitrate delivery for the generic bioequivalent product.

Obs.

The observation corresponds to a given skin on which the log ECZ delivery was collected for each of the reference and generic cream.

References

Quartier, Julie, et al. "Cutaneous Biodistribution: A High-Resolution Methodology to Assess Bioequivalence in Topical Skin Delivery", Pharmaceutics, (2019). Boulaguiem, Younes, et al. "Finite Sample Adjustments for Average Equivalence Testing", Statistics in Medicine, (2023)

Examples

data(skin)
theta <- diff(apply(skin,2,mean))
nu <- nrow(skin)-1
sigma_nu <- sd(apply(skin,1,diff))/sqrt(nu)

Two One-Sided Test (TOST) for (Bio)Equivalence Testing

Description

This function performs a Two One-Sided Test (TOST) for (bio)equivalence testing.

Usage

tost(theta, sigma, nu, alpha, delta)

Arguments

theta

A numeric value corresponding to the difference of means (e.g. between a generic and reference drug).

sigma

A numeric value corresponding to the standard error.

nu

A numeric value corresponding to the number of degrees of freedom.

alpha

A numeric value specifying the significance level.

delta

A numeric value corresponding to (bio)equivalence limit. We assume symmetry, i.e, the (bio)equivalence interval corresponds to (-delta,delta)

Value

A tost object with the structure:

Author(s)

Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier

Examples

data(skin)

theta_hat = diff(apply(skin,2,mean))
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))