Opens in a new tab

Home / Resources / AI in Research

AI and Clinical Trial Data:
Protocol, SAP and Bias Checks First

AI and clinical trial data can work well together when AI supports controlled programming, documentation or quality checks. But a randomized trial's statistical analysis is defined by its protocol, statistical analysis plan (SAP), estimands and data-handling requirements, not by a model's preferred test. Independent validation is especially important where clinical results support regulatory or treatment decisions (FDA, 2021; EMA, 2025).

AI in Research
TERMSEstimand, SAP
NEEDSProtocol and SAP
REPORTEstimates with CIs
GUIDELINEICH E9(R1)
COMMON ERRORCompleters-only contrast

Here, AI assistance is a tool applied to clinical trial data, not the intervention under study. That differs from a clinical trial evaluating an AI-based intervention, a distinction that matters for both reporting standards and regulatory expectations.

What should be fixed before AI drafts a single line of code?

Planning element Why it matters
Trial design and randomization Defines treatment groups, units and comparison structure
Primary endpoint and timing Determines the primary analysis target
Estimand States the treatment effect being estimated and treatment of intercurrent events
Analysis populations Defines who enters intention-to-treat, full-analysis or per-protocol sets
Missing-data handling Establishes main assumptions and sensitivity analyses
Multiplicity Controls interpretation across multiple endpoints or comparisons
Analysis plan and amendments Separates prespecified tests from exploratory changes

The ICH E9(R1) estimands framework helps connect the clinical question with the target treatment effect, including how events such as treatment discontinuation or rescue medication are handled (FDA, 2021). An AI-generated script may fit a standard model while answering the wrong clinical question if these details are absent.

What tasks can AI support?

Useful controlled tasks include writing template code from a fictional data structure, documenting variable transformations, generating shell tables, reviewing syntax for reproducibility and identifying candidate consistency checks. The analyst must still inspect the code, run it in an authorized environment and validate the clinical/statistical decisions.

High-stakes analysis needs independently reproducible datasets, programming specifications, quality control and review records. Sponsor requirements, the protocol and the applicable regulatory framework determine the appropriate validation process. Not every small academic trial needs the same infrastructure as a pivotal regulatory submission, but both require defensible methods. Independent Statistical Review covers analyses prepared with AI assistance.

Why is a generic “compare the groups” prompt insufficient?

Illustrative example: Suppose the primary outcome is measured repeatedly and some participants discontinue treatment. A prompt that returns an independent t-test on completers may yield mathematically correct group means. It does not establish that a completers-only contrast corresponds to the prespecified estimand, deals with missingness appropriately or respects the repeated measurement structure.

The clinical question must be stated first. Different strategies for handling intercurrent events can legitimately target different estimands. A sensitivity analysis should assess robustness for the same estimand, rather than silently changing the question (FDA, 2021).

AI and clinical trial data: what do current regulators expect?

The ICH E6(R3) principles and Annex 1 emphasize proportionate quality management, appropriate systems and data integrity; on the EMA’s implementation timeline these came into effect in July 2025. The separate Annex 2 becomes effective in January 2027 in that jurisdiction (EMA, 2026). These principles should not be misrepresented as a rule that every use of ChatGPT in research is prohibited.

The FDA’s January 2025 document on AI used to support regulatory decision-making for drugs and biological products is a draft guidance concerning AI-produced information used in regulatory contexts. It should not be cited as a final binding rule for all academic trial analyses (FDA, 2025).

A verification matrix before a trial result is released

Quality check What to confirm
Protocol/SAP reconciliation Every final model matches a documented endpoint and objective
Blind review or controlled changes Changes are dated, justified and distinguished from prespecified analyses
Dataset lineage Derivations, reconciliation and analysis populations are traceable
Statistical programming QC Independent checking of critical code and outputs as appropriate
Missingness and intercurrent events Handled consistently with the estimand and sensitivity plan
Reporting Effect estimates, confidence intervals and deviations documented accurately

Does this include real-world clinical data?

Observational healthcare databases require additional attention to confounding by indication, selection, time-related biases and causal identification (Hernán & Robins, 2020). Those issues do not automatically describe a properly randomized comparison. When a report combines trial and real-world data, it should state which framework applies to each result.

Frequently asked questions

Potentially, when authorized by sponsor and institutional policies and when privacy, security, version control and validation requirements are met.

Do not upload until the study’s data steward and applicable agreements authorize that exact system and processing arrangement. Generic code can be drafted without exposing subject-level records.

Not automatically. The material question is whether methods, tools, processing and disclosure comply with the approved protocol, relevant governance and required amendments.

Independent Statistical ReviewNeed the analysis checked against the protocol and SAP? A statistician reviews endpoints, estimands and analysis populations against what the trial prespecified.

Request an Assessment

Independent Statistical Review

Independent Statistical Review is carried out by in-house PhD-level statisticians at OnlineSPSS, and it checks method, assumptions, reproducibility and reporting. Overall responsibility for the study remains with the research team. Research data and project details are handled confidentially, and an NDA is available where required.

References

Last reviewed November 2026 by the OnlineSPSS Statistical Team. Worked examples use hypothetical values and are not client data.

NEXT STEP

Need this done for
your study?

Share your research in about a minute and receive a complimentary assessment the same day: scope, timeline and one fixed fee.

No Commitment Required

Strictly Confidential

Fixed Project Fee

In-House PhD-Level Statisticians

Same-Day Response

Serving Researchers Since 2014