A newly introduced open-source software package called adsasi provides a simulation-first framework for calculating sample sizes and optimizing study designs in experimental settings where analytical formulas are unavailable or impractical. Developed by researcher Skerdi Haviari and published in BMC Medical Research Methodology, the R package addresses an enduring methodological barrier in clinical trial design. Determining an adequate sample size is a foundational requirement for clinical trials and other empirical investigations, yet many modern study configurations cannot be resolved with tractable closed-form mathematical solutions.
Existing software tools developed for clinical trial simulation generally support scenario generation, but they offer limited utility for adaptive, empirically driven sample size optimization. To overcome these constraints, adsasi conducts simulation-first sample size estimation alongside design optimization for complex experimental protocols by adaptively exploring the design space. This computational methodology delivers a structured, systematic process that replaces traditional, inefficient trial-and-error calculations when investigators plan intricate medical experiments.
Operationally, the package requires users to program a custom simulation function that generates a complete experimental scenario and outputs an unambiguous binary indicator reflecting trial success or failure. The system interfaces with these user-defined functions through two primary computational wrappers, designated adsasi_0d and adsasi_1d. These functions iteratively evaluate candidate sample sizes across successive stages to establish how sample numbers directly influence empirical statistical power.
To characterize the relationship between sample size and empirical power, adsasi fits a modified probit regression model that incorporates custom simulation-wise partial likelihoods, analytical gradients, and exact Hessian matrices. By applying the Cramér-Rao approximation, the algorithm derives standard errors to quantify estimation uncertainty. Within this setup, adsasi_0d calculates the necessary sample size for fixed experimental designs, while adsasi_1d simultaneously evaluates one tunable design parameter alongside the required sample size to optimize study parameters.
The software was validated against benchmark scenarios possessing established analytical solutions, specifically equal and unequal allocation two-sample t-tests, as well as complex experimental settings lacking closed-form expressions. Across these tests, empirical sample size estimates derived by adsasi closely matched known analytical solutions within expected Monte Carlo variability. Furthermore, the wrapper routines progressively concentrate computational effort near the target region, markedly enhancing workflow efficiency relative to user-driven guess-and-check procedures.
In multivariable evaluations, adsasi_1d successfully captured intractable relationships between sample sizes and design parameters, locating an optimum close to the analytical solution whenever an analytical solution existed. Because the package imposes very few restrictions on the underlying simulation functions, users can assess diverse trial structures. Permissible setups include multistage decision rules, simultaneous endpoint requirements, rank-based statistical analyses, and bootstrap resampling conducted on observational clinical datasets.
To assist researchers throughout optimization runs, adsasi outputs real-time diagnostic metrics and uncertainty estimates that allow users to evaluate convergence and monitor statistical model stability. Overall, the package delivers a general and flexible computational framework for simulation-based sample size determination where analytical approaches remain impractical. By streamlining the planning of complex or unusual trials and experiments, the open-source software aims to accelerate their eventual clinical implementation.
Subject of Research: Simulation-based sample size estimation and clinical trial design optimization in R
Article Title: A simulations-first approach to sample sizes and design optimization with R package adsasi
Article References: Haviari, S. (2026). A simulations-first approach to sample sizes and design optimization with R package adsasi. BMC Medical Research Methodology. https://doi.org/10.1186/s12874-026-03033-6
Image Credits: AI Generated
DOI: 10.1186/s12874-026-03033-6
Keywords: adsasi, sample size determination, clinical trial design, simulation-first optimization, empirical power, probit regression, partial likelihoods, Cramer-Rao approximation, adsasi_0d, adsasi_1d, Monte Carlo variability, two-sample t-test, multistage decision rules, simultaneous endpoints, rank-based analysis, bootstrap sampling
News Source: Ophelia Keating. (November 20, 2026). R Package Adsasi Optimizes Clinical Trial Sample Sizes via Adaptive Simulation. Scienmag.



