Learn R Programming

SimTOST

SimTOST is an R package specifically designed for bioequivalence studies, providing simulation-based sample size estimation for the Two One-Sided Tests (TOST) procedure. It offers flexible options to handle complex study designs, including trials with multiple correlated primary endpoints, multiple hypotheses, and treatment arms. By incorporating correlations between endpoints, SimTOST ensures accurate and robust planning of bioequivalence trials, making it a powerful tool for studies with intricate requirements.

Installation

SimTOST is available on CRAN and can be installed by running the following code.

install.packages("SimTOST")

You can also install the development version of SimTOST from GitHub with:

# install.packages("devtools")
devtools::install_github("smartdata-analysis-and-statistics/SimTOST")

Vignettes

The main features of this package is sampleSize function which can be used to calculate sample size for individual and multiple endpoints. Various worked examples are available as vignettes, with an introduction provided at Introduction.

VignetteDesignNumber of ArmsNumber of Endpoints
Bioequivalence Tests for Parallel Trial Designs with Log-Normal DataParallel2Multiple (e.g., 2 or 3)
Bioequivalence Tests for 2x2 Cross-Over Trial Designs with Log-Normal DataCross-over22
Bioequivalence Tests for Parallel Trial Designs: 2 Arms, 1 EndpointParallel21
Bioequivalence Tests for Parallel Trial Designs: 3 Arms, 1 EndpointParallel31
Bioequivalence Tests for Parallel Trial Designs: 2 Arms, 3 EndpointsParallel23
Bioequivalence Tests for Parallel Trial Designs: 3 Arms, 3 EndpointsParallel33

Copy Link

Version

Install

install.packages('SimTOST')

Monthly Downloads

247

Version

1.0.2

License

Apache License (>= 2)

Maintainer

Thomas Debray

Last Published

February 18th, 2025

Functions in SimTOST (1.0.2)

derive_arm_names

Derive or Assign Arm Names
run_simulations_2x2_dom

Run Simulations for a 2x2 Crossover Design with Difference of Means (DOM) test
run_simulations_2x2_rom

Run Simulations for a 2x2 Crossover Design with Ratio of Means (ROM) test
run_simulations_par_dom

Run Simulations for a Parallel Design with Difference of Means (DOM) test
derive_varcov_list

Derive Variance-Covariance Matrix List
power_Mielke

Power Calculation for Hypothesis Testing in Equivalence Trials
test_studies

test_studies
power_cal

Calculate the power across all comparators
power_dom

Power Calculation for Difference of Means (DOM) Hypothesis Test
info_msg

Helper function for conditional messages
sign_Mielke

Simulated Test Statistic for Noninferiority/Equivalence Trials
validate_positive_definite

Validate Positive Semi-Definite Matrices
simParallelEndpoints

Generate Simulated Endpoint Data for Parallel Group Design
run_simulations_par_rom

Run Simulations for a Parallel Design with Ratio of Means (ROM) test
uniroot.integer.mod

Optimizer for Uniroot Integer (Modified)
ptv

Compute p-values for a t-distribution with Fixed Degrees of Freedom
validate_sample_size_limits

Check Sample Size Limits
ptvdf

Calculate p-values using t-distribution with Variable Degrees of Freedom
test_par_dom

Simulate a Parallel Design and Test Difference of Means (DOM)
sampleSize

Sample Size Calculation for Bioequivalence and Multi-Endpoint Studies
test_par_rom

Simulate a Parallel Design and Test Ratio of Means (ROM)
print.simss

Print Summary of Sample Size Estimation
test_2x2_dom

Simulate a 2x2 Crossover Design and Compute Difference of Means (DOM)
sampleSize_Mielke

Sample Size Estimation for Multiple Hypothesis Testing Using Mielke's Method
test_2x2_rom

Simulate a 2x2 Crossover Design and Compute Ratio of Means (ROM)
mcsapply

mcsapply
plot.simss

Plot Power vs Sample Size for Simulation Results
SimTOST

Sample Size Estimation via Simulation
get_par

Parameter Configuration for Endpoints and Comparators
check_equivalence

Check Equivalence for Multiple Endpoints
derive_allocation_rate

Derive and Validate Treatment Allocation Rate (TAR)
derive_endpoint_names

Derive Endpoint Names