bioRxiv · 10.1101/2025.02.06.636776
N-Power AI: A Specialized Agent Framework for Automated Sample Size and Power Analysis in Clinical Trial Design
Abstract
BackgroundSample size and power analysis are essential in biomedical research and investigations, particularly in clinical trial design, as they ensure sufficient statistical power to detect meaningful effects. However, the complexity of these calculations often requires specialized statistical expertise, making the process inconvenient and limiting accessibility for researchers during early-stage study planning. MethodsWe developed N-Power AI, an agentic framework leveraging large language models (LLMs) to perform sample size and power calculations across diverse study designs. The framework consists of three specialized agents: the Function Agent, a perception and reasoning module that identifies appropriate statistical tests and corresponding R functions; the Calculation Agent, an action module that extracts parameters and executes precise computations; and the Reporting Agent, a presentation module that generates comprehensive, downloadable reports. N-Power AI and advanced LLMs (e.g., GPT-o1, Claude 3.5, Gemini 1.5 Pro) were evaluated against ground truths from statistical software (R) across six common clinical trial scenarios. ResultsDirect LLM outputs showed significant deviations from ground-truth values, particularly in complex scenarios like the Chi-Square Test and Cox Proportional Hazards Model. In contrast, N-Power AI achieved 100% agreement with ground truths across all scenarios. This accuracy is attributed to the Function Agents correct selection of statistical methods, the Calculation Agents accurate computations, and the Reporting Agents ability to produce clear and comprehensive summaries. ConclusionN-Power AI automates sample size and power analysis, offering an effective, efficient, and accessible solution for early-stage study planning. While human expertise remains crucial for high-level statistical planning, N-Power AI enhances accessibility and efficiency, streamlining the analysis process to generate reliable and reproducible results for a wide range of research scenarios.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Ruan, P., Villanueva-Miranda, I., Liu, J., Yang, D. M., Zhou, Q., Xiao, G., Xie, Y.. 2025-02-08. N-Power AI: A Specialized Agent Framework for Automated Sample Size and Power Analysis in Clinical Trial Design. https://doi.org/10.1101/2025.02.06.636776
Cite the original work for its findings. Save a collection to share your selection of sources.