Protocol Writing and Statistical Analysis Plans

Pre-specify study conduct, endpoints, models, and reporting plans.

Quick answer

Protocol Writing and Statistical Analysis Plans in DataStatPro helps researchers understand the method, choose appropriate assumptions and outputs, and connect the analysis to publication-ready reporting. Pre-specify study conduct, endpoints, models, and reporting plans.

Protocol Writing and Statistical Analysis Plans: Zero to Hero Tutorial

This tutorial explains how to write research protocols and statistical analysis plans that make studies transparent, reproducible, and analysis-ready. It is useful for experiments, clinical trials, observational studies, surveys, and program evaluations.


Table of Contents

  1. Prerequisites and Background Concepts
  2. Why Protocols and SAPs Matter
  3. Protocol Structure
  4. Statistical Analysis Plan Structure
  5. Endpoints and Estimands
  6. Sample Size and Power
  7. Missing Data and Protocol Deviations
  8. Reporting and Reproducibility
  9. Using DataStatPro
  10. Worked Examples
  11. Common Mistakes and How to Avoid Them
  12. Quick Reference Cheat Sheet

1. Prerequisites and Background Concepts

You should understand:

  • Protocol: The complete plan for conducting the study.
  • Statistical analysis plan: The pre-specified plan for analyzing data.
  • Endpoint: Outcome used to evaluate the research question.
  • Analysis population: Set of participants included in a specific analysis.
  • Estimand: The treatment or exposure effect being targeted.
  • Protocol deviation: Departure from the approved study plan.

2. Why Protocols and SAPs Matter

Protocols and SAPs reduce:

  • Selective reporting.
  • Outcome switching.
  • Analytical flexibility.
  • Ambiguous decision rules.
  • Reproducibility problems.

They also help teams align before data collection begins.


3. Protocol Structure

A strong protocol includes:

  1. Title and version history.
  2. Background and rationale.
  3. Objectives and hypotheses.
  4. Study design.
  5. Setting and population.
  6. Eligibility criteria.
  7. Intervention or exposure definitions.
  8. Outcomes and measurement schedule.
  9. Sample size justification.
  10. Data collection and management.
  11. Ethics and safety.
  12. Dissemination plan.

The protocol should explain what will happen. The SAP should explain exactly how results will be analyzed.


4. Statistical Analysis Plan Structure

A SAP should include:

  • Analysis objectives.
  • Primary and secondary endpoints.
  • Analysis populations.
  • Derived variables.
  • Descriptive summaries.
  • Primary model.
  • Covariates.
  • Subgroup analyses.
  • Multiplicity strategy.
  • Missing-data methods.
  • Sensitivity analyses.
  • Table and figure shells.

Pre-specification does not prevent judgment. It prevents hidden judgment.


5. Endpoints and Estimands

An endpoint defines what is measured. An estimand defines the effect being estimated.

Estimand elements:

  • Population.
  • Treatment or exposure conditions.
  • Endpoint.
  • Intercurrent events.
  • Summary measure.

Example:

Difference in mean 12-week systolic blood pressure between assigned treatment arms, regardless of adherence, among randomized participants.


6. Sample Size and Power

Document:

  • Primary endpoint.
  • Effect size or precision target.
  • Significance level.
  • Power.
  • Variance or event-rate assumptions.
  • Allocation ratio.
  • Attrition adjustment.

For attrition:

nrecruited=nrequired/(1r)n_{\text{recruited}} = n_{\text{required}}/(1-r)

where rr is expected dropout proportion.


7. Missing Data and Protocol Deviations

Plan how to handle:

  • Missing baseline variables.
  • Missing outcomes.
  • Dropouts.
  • Nonadherence.
  • Ineligible participants.
  • Duplicate records.
  • Outliers.

Common analysis populations:

PopulationDefinition
Intention-to-treatAnalyzed according to assignment
Per-protocolFollowed protocol sufficiently
SafetyReceived at least one exposure or intervention
Complete caseHas required variables for analysis

8. Reporting and Reproducibility

Prepare:

  • Table shells.
  • Figure shells.
  • Variable dictionary.
  • Analysis dataset specifications.
  • Version-controlled analysis scripts.
  • Audit trail for protocol amendments.

Report deviations from the SAP transparently.


9. Using DataStatPro

Use DataStatPro to:

  • Estimate sample size and power.
  • Create planned descriptive tables.
  • Run pre-specified tests and models.
  • Export effect estimates and confidence intervals.
  • Generate publication-ready figures.

The SAP should name the planned DataStatPro analysis module when appropriate.


10. Worked Examples

Example 1: Two-Arm Trial SAP

Primary endpoint: 12-week blood pressure. Primary model: ANCOVA adjusted for baseline blood pressure and site. Analysis population: intention-to-treat.

Example 2: Survey Protocol

Primary estimate: student satisfaction proportion. Sampling: stratified by year. Analysis: weighted proportion with 95% confidence interval.

Example 3: Observational Cohort SAP

Primary exposure: treatment received within 48 hours. Primary outcome: 30-day readmission. Analysis: adjusted logistic regression with pre-specified confounders.


11. Common Mistakes and How to Avoid Them

MistakeWhy It MattersBetter Practice
SAP written after seeing outcomesBias riskFinalize before analysis
Vague endpointsOutcome switchingDefine variable, time point, and scoring
No missing-data planFlexible conclusionsPre-specify primary and sensitivity methods
Too many unplanned subgroupsFalse positivesLimit and justify subgroup analyses
No table shellsReporting driftDraft shells before analysis

12. Quick Reference Cheat Sheet

DocumentPurpose
ProtocolConduct the study
SAPAnalyze the study
Data dictionaryDefine variables
Table shellsPredefine reporting
Amendment logTrack changes

SAP essentials:

  • Primary endpoint.
  • Primary model.
  • Analysis population.
  • Covariates.
  • Missing-data strategy.
  • Multiplicity strategy.
  • Sensitivity analyses.

Key formula:

nrecruited=nrequired/(1r)n_{\text{recruited}} = n_{\text{required}}/(1-r)

Report protocol version, SAP version, amendment dates, and deviations.