Draft a SAP skeleton with AI in 15 minutes
Works in Microsoft 365 Copilot, ChatGPT, or Claude. No coding, no real trial data. You stay the statistician; AI writes the first draft and tells you what it doesn't know.
Tested once in Microsoft 365 Copilot (GPT), October 2026. Facts checked against the sources linked on this page. How we check.
When to use it
You have a protocol synopsis (objectives, endpoints, design) and want a SAP outline to react to instead of a blank page.
Step 1: Paste this prompt
You are assisting a senior biostatistician. Draft a Statistical Analysis Plan SKELETON from the protocol information below. Rules: 1. Use ONLY information in the input. If the input does not state something (analysis method, multiplicity, missing-data handling, analysis sets), do NOT invent it. Put it in a section titled "OPEN QUESTIONS FOR THE STATISTICIAN" and propose 1-2 common options with trade-offs. 2. Mark every statement as [FROM PROTOCOL] or [ASSUMPTION - CONFIRM]. 3. Structure: Objectives and Endpoints; Study Design; Analysis Sets; Primary Analysis; Secondary Analyses; Handling of Missing Data; Multiplicity; Safety Analyses; Subgroups/Sensitivity; Open Questions. 4. Do not fabricate sample size justification, effect sizes, or p-values. 5. Write for a statistical reviewer: concise, no marketing language. INPUT: [paste protocol synopsis here]
Step 2: Review with the 6-point checklist
- Every [FROM PROTOCOL] item matches the source (spot-check 100% of endpoints)
- Every [ASSUMPTION] is one you would defend, or you changed it
- The estimand is explicit and has all five ICH E9(R1) attributes: treatment, population, variable (endpoint), intercurrent-event strategy, and population-level summary
- The multiplicity strategy is yours, not the AI's default
- No invented numbers anywhere
- The open-questions list reflects real decisions for the team
Step 3: Resolve the open questions, then ask for a skeptical review
Make your own decisions on the open questions first, and paste them in. Asking for a review of the bare skeleton mostly returns the skeleton's own open questions, re-ranked (see the test result below).
Now act as a skeptical regulatory statistical reviewer. List the 10 most likely questions or objections to this SAP draft, ranked by seriousness.
Worked example (public data)
Source: the public ClinicalTrials.gov record NCT02906930, a phase 3, randomized, double-blind trial of oral semaglutide (3, 7 and 14 mg) vs placebo in 703 adults with type 2 diabetes treated with diet and exercise alone. Primary outcome: change in HbA1c from baseline to week 26. Secondary outcomes include body weight, fasting plasma glucose, SMPG measures, and fasting insulin and proinsulin ratios.
For the exercise, paste in only what you would have at protocol stage: the design, arms, population, and the outcome names and time frames. Deliberately leave out the results section.
What a good AI draft does with that input
- Lists the primary endpoint as [FROM PROTOCOL].
- Does not state the primary model, because the design and outcome descriptions don't specify it. It goes under open questions (for example ANCOVA vs MMRM, with the missing-data trade-offs).
- Flags that nothing specifies how treatment discontinuation or rescue medication is handled in the estimand. ICH E9(R1) names five strategies for intercurrent events (treatment policy, composite, while on treatment, hypothetical, principal stratum), and the AI should ask you to choose, not pick one.
- Flags that three active doses vs one placebo needs a multiplicity decision and doesn't pick one silently.
- Notes that "ratio to baseline" endpoints often point to a log-scale analysis, and asks you to confirm.
Now check the AI against what the sponsor actually did
After a trial reports, the Results section of the same ClinicalTrials.gov record describes the analyses. For the HbA1c endpoint it reports two: an "in-trial" analysis labelled a treatment policy estimand (multiple imputation under a pattern mixture model, then ANCOVA with treatment and region as fixed effects and baseline HbA1c as a covariate, pooled with Rubin's rules) and an "on-treatment" analysis labelled a hypothetical estimand (an MMRM assuming data missing at random). The record's outcome description frames the in-trial analysis as the evaluation of the primary endpoint and says the endpoint was "also analysed" on-treatment. It states the in-trial analyses were controlled for multiplicity and the on-treatment analyses were not, but the record text doesn't name the procedure (the SAP does, below). The full analysis set is all randomised participants.
The sponsor also posted its real documents on that record, so you can compare your AI draft to the actual thing: the protocol (PDF) and the statistical analysis plan (PDF). Here is what that SAP (version 1.0, dated 26 January 2018) decided, so you know what to score your AI against:
- It calls the in-trial analysis the primary estimand and the on-treatment-without-rescue analysis the secondary estimand.
- Primary analysis: a pattern mixture model with multiple imputation. Missing week-26 values are imputed within 8 groups defined by randomised arm and by whether the subject discontinued or started rescue medication or stayed on treatment. It uses 1,000 imputations, then ANCOVA with treatment and region as fixed effects and baseline HbA1c as a covariate, pooled by Rubin's rule.
- Secondary estimand: an MMRM with an unstructured covariance matrix. Subjects with no post-baseline data have their baseline value carried forward to the first planned visit.
- Sensitivity analyses: two comparator-based multiple-imputation analyses (one by reason for discontinuation) and tipping-point analyses.
- Multiplicity: a weighted Bonferroni-based closed testing procedure across six confirmatory hypotheses (HbA1c and body weight at each of three doses). Testing starts with HbA1c at the highest dose, and higher doses must be confirmed before lower ones.
- Scale: fasting insulin, proinsulin, CRP and lipid endpoints are analysed on the log scale.
Notice how many of those are exactly the decisions a good AI draft should have flagged as open questions, and how many a vague prompt would never raise.
Now score your AI draft. Which open questions did it raise that the sponsor actually had to answer? Which sponsor decisions did it never mention? Those misses show you where to tighten your prompt.
A real test: Microsoft 365 Copilot (GPT)
This prompt and protocol-stage input were run in October 2026 in Microsoft 365 Copilot using a GPT model, and the output was scored against the sponsor's SAP:
- It did not guess. It chose no model, estimand, missing-data method or multiplicity strategy on its own, and it invented no numbers.
- It raised the right questions: treatment-policy vs hypothetical handling of rescue medication and discontinuation; full analysis set vs modified ITT; ANCOVA vs a repeated-measures model for the primary analysis; likelihood-based modelling under MAR vs multiple imputation; multiplicity across the three doses and the secondary endpoints; and log-scale analysis for fasting insulin and proinsulin. The sponsor's SAP made essentially these choices.
- What it missed: the pre-specified sensitivity analyses (comparator-based and tipping-point imputation), and it offered only two of the five ICH E9(R1) intercurrent-event strategies.
- A usability flaw: it tagged everything it couldn't find as [ASSUMPTION - CONFIRM], including plain statements that the input doesn't specify something, and it repeated each gap in several sections. That makes the tags less useful as a signal.
The skeptical-reviewer follow-up, same test:
- Useful: it ranked ten objections by seriousness and added points the skeleton had missed. It named sensitivity-analysis families (reference-based imputation, delta-adjusted pattern mixture, tipping point), which the sponsor's SAP used. It also asked whether post-discontinuation HbA1c would be collected, whether hypotheses were one- or two-sided, and where the sample-size justification is traceable. The sponsor's SAP answers each of these.
- Weak: most objections restated the skeleton's own open questions, and it criticized the draft for not choosing a model or estimand, which the prompt had told it not to do. Nearly everything was rated Critical or Major with High confidence, so the ranking did little to separate the issues that matter.
- Lesson: the review is far more valuable on a draft where you have already made decisions than on the skeleton.
One run, one model, one trial: treat this as an example of the behaviour to look for, not a guarantee.
What the research says (and doesn't)
- A 2026 JMIR study that tested Claude on drafting an analysis plan from a clinical objective concluded the model performs reliably for SAP drafting but needs expert verification of formula composition, cohort-boundary logic, and result concordance.
- A study of GPT-4o on 15 registered trials found it got the disease, intervention and comparator right in every trial and the sample size in 14 of 15, but its SAP critiques had limitations in content.
- An ISPOR 2026 poster reported roughly 3-4% of generated SAP table shells needing manual refinement. It's a conference abstract, so treat it as preliminary.
Takeaway: AI is good at structure and extraction, and weaker at statistical logic. That is why this workflow makes it list what it can't decide.