Write the analysis plan before the data arrive

write-pre-analysis-plan

Testv0.3.0atomicdraftThe Agency Fund

Writes down how a trial's results will be analyzed before anyone sees the outcome data.

What this adds: asks first whether anyone has seen outcome data by arm; carries the design and primary outcome over unchanged; gives every secondary outcome a family and a named way of handling multiple tests; requires a reason and a status for each subgroup; writes a decision for each range of the primary result; and checks which registry applies.

Expert reviews are for staff at The Agency Fund and Irrational Labs; anyone can rate.

Skill

The instructions your AI follows when this skill runs. Installing the skill gives it this file and everything in the other tabs.

SKILL.mdView on GitHub

Takes in

evaluation-designEvaluation designFrom choose-trial-designmeasurement-planMeasurement planFrom plan-agency-measurement, plan-evaluation-design
write-pre-analysis-plan

Produces

analysis-planAnalysis planUsed by analyze-heterogeneous-effects

See it on the map

Install

/plugin marketplace add agency-fund/besci-skills
/plugin install besci-skills@besci-skills

What it does

Writes down how a trial's results will be analyzed before anyone sees the outcome data.

What this adds: asks first whether anyone has seen outcome data by arm; carries the design and primary outcome over unchanged; gives every secondary outcome a family and a named way of handling multiple tests; requires a reason and a status for each subgroup; writes a decision for each range of the primary result; and checks which registry applies.

When to use it

Use it when

  • A trial is about to launch and nobody has written down how its results will be analyzed
  • Someone asks "what goes in a pre-analysis plan?" or "what do we put in the AEA registry?"
  • A team proposes subgroups ("look at women too") and wants to commit before the data exist

Do not use it when

  • The primary outcome or the smallest change worth detecting is still open; use plan-evaluation-design
  • The comparison or the unit of randomization is still open; use choose-trial-design
  • The data are in and the question is how effects differ by subgroup; use analyze-heterogeneous-effects

Before you start

Ask only what the user has not answered.

  1. Required. The design: comparison, unit of randomization, arms, strata, timing.
  2. Required. The primary outcome, with its source, window, and smallest change worth detecting.
  3. Required. Whether anyone has seen outcome data by arm, even on a dashboard. Baseline data are fine.
  4. Optional. Secondary outcomes, and each proposed subgroup with its reason.
  5. Optional. Who has a stake in the result; the registry, deadline, and baseline variables.

If 1, 2, or 3 is missing, ask and stop; if outcome data by arm have been seen, go to the specialist note. Without 4, write a primary-only plan. Without 5, assume the implementer and funder have a stake.

What it draws on

  • Duru, M., Sautmann, A., Turitto, J., & Welch, K. (2023). Pre-analysis plans and Trial registration. J-PAL Research Resources. https://www.povertyactionlab.org/resource/pre-analysis-plans and https://www.povertyactionlab.org/resource/trial-registration Supports: when to file, a "concise and focused" plan, edits, and the populated plan; the registry rules in step 8.
  • Banerjee, A., Duflo, E., Finkelstein, A., Katz, L., Olken, B., & Sautmann, A. (2020). In praise of moderation: Suggestions for the scope and use of pre-analysis plans for RCTs in economics (NBER Working Paper 26993). https://doi.org/10.3386/w26993 Supports: step 6, where detail is worth adding.
  • Brodeur, A., Cook, N. M., Hartley, J. S., & Heyes, A. (2024). Do preregistration and preanalysis plans reduce p-hacking and publication bias? Evidence from 15,992 test statistics and suggestions for improvement. Journal of Political Economy Microeconomics, 2(3), 527–561. https://doi.org/10.1086/730455 Supports: writing the plan, not only the registry entry.

Where the evidence comes from: This is a procedure and makes no claim about how program participants behave. Its sources are economists' guidance and papers on trials in many countries, and a study of trials in leading economics journals. What is local is which registry the funder or journal requires, and whether ethics approval comes first.

Replication status: Contested on detail. Banerjee and colleagues argue the registry's fields usually suffice; Brodeur and colleagues found no sign that registration alone reduced p-hacking (trying analyses until one is significant), but signs that registration with a plan did.

How to do it

  1. Carry the design and primary outcome over word for word.
  2. Write the hypotheses: the primary one with direction, outcome, and comparison arm; then one per secondary family.
  3. Fix the primary outcome for analysis: any transformation, and the rule for missing values. Two primaries become a family with a correction, so "one of two moved" is not reported as success.
  4. Group secondary outcomes into families by what they measure, and name how each handles multiple tests: a summary index, or a false discovery rate correction (Benjamini–Hochberg). Outcomes outside a family are exploratory.
  5. Specify the estimator: the effect of assignment, whether or not people took part (intention to treat); covariates, including strata, named now; standard errors clustered at the unit randomized, if groups were; exclusions by one rule for every arm; and a test of whether drop-out differs by arm.
  6. List subgroups with the variable and cut, the reason the effect should differ, and a status, confirmatory or exploratory; drop any with no reason. Add detail where the outcome could be built several ways, a subgroup matters, or a party has a stake; keep the rest short. Commit to a populated plan: a later report of every pre-specified test and deviation.
  7. Write the decision rules: what the team will do, and who decides, if the primary result is at or above the smallest change worth detecting, positive but below it, or null or negative; and which harm would stop adoption regardless.
  8. Plan the registration in the registry the funder or journal requires; health and medical journals that follow ICMJE rules require an approved clinical trial registry, even for a social science trial. Register before the intervention starts, attach this plan, and name who holds the outcome data until then.

See references/worked-example.md for a complete run.

Output template

<Two or three plain sentences to the user: what the plan commits to (the primary test and what each result would lead to), where it adds detail because someone has a stake, and that it must be registered before anyone sees outcome data by arm.>

# Pre-analysis plan: <trial>

**Date fixed:** <date>
**Outcome data by arm (each group compared) seen before this date:** <none / what, by whom, when>
**Registry:** <name; id when issued>

## 1. Design (carried over)
<comparison; unit of randomization; arms and allocation; strata; timing; sample>

## 2. Hypotheses
- **H1 (primary):** <the change, its direction, on which outcome, against which arm>
- **H2 to Hn:** <one per secondary family>

## 3. Primary outcome
<carried over: measure, source, window; for analysis: transformation, missing-value rule; smallest change worth detecting and who set it>

## 4. Secondary outcome families: outcomes tested as a group
| Family | Outcomes | How multiple tests are handled | Why grouped |
|---|---|---|---|
| <...> | <...> | <summary index / false discovery rate correction / reported without a test> | <...> |

## 5. How the effect is estimated (the estimator)
- **Effect estimated:** <intention to treat, by assigned arm>
- **Model:** <outcome on arm indicators, strata, named baseline covariates>
- **Standard errors (how uncertainty is computed):** <robust / clustered at <unit>, the unit randomized>
- **Exclusions:** <rule, applied to every arm>
- **Drop-out:** <test for differences between arms>

## 6. Subgroups
| Subgroup | Variable and cut | Why the effect should differ | Status |
|---|---|---|---|
| <...> | <...> | <...> | <confirmatory / exploratory> |

## 7. Decision rules
| Primary result | What the team will do | Who decides |
|---|---|---|
| At or above <smallest change worth detecting> | <...> | <...> |
| Positive but below it | <...> | <...> |
| Null or negative | <...> | <...> |

**Would stop adoption whatever the primary shows:** <a harm, and its threshold>

## 8. Where this plan is detailed, where it is flexible
<detail added for which stake, subgroup, or outcome, and why; what is left flexible; the commitment to a populated plan>

## 9. Registration
<registry and why; plan attached and dated; hidden until completion: yes / no; who holds the outcome data until registration is confirmed>

## Open questions
- <...>

## Where you could go from here
<One line saying the pre-analysis plan is done.>
<Two or three next moves that fit what this run found, each with why it would help and when it fits. Candidates:
- `estimate-sample-size`, when nobody has checked that the sample can detect the smallest change worth detecting, or a confirmatory subgroup difference
- `analyze-heterogeneous-effects`, after the outcome data arrive, when the plan names subgroups to test
- the registry the funder or journal requires, when the entry is not yet filed: it must be dated before the intervention starts, with this plan attached
- whoever holds the outcome data, when an open question is about how the records are kept, or when they must agree to share no tables by arm until registration is confirmed
- an independent evaluator to hold the plan, when the implementer, funder, or research team has a stake in the result
- a statistician, when the design is clustered, stepped-wedge, or adaptive>
Questions you could ask next: "<question>" · "<question>"

How to talk with the user

  • If the user asked a question rather than asked for this skill's output, answer the question first, in a few plain sentences. Then offer the run and say what it would add.
  • Mark the run. When it starts, say so in one line: the skill, and what it will produce. When the output is done, say the run is finished. The user should always know when the library's method is in force.
  • Talk with the person, not at them. Use their words for their program and the people in it, say why you ask each question, and say what you are unsure of. No praise, no filler.
  • Say where each claim comes from: this skill's sources, your general knowledge, or nothing in the library. A number the sources do not give, such as how many interviews to run, is your judgment; say so, and why you chose it.
  • End with the template's closing: two or three next moves that fit what this run found, each with its reason and when it fits, and one or two questions the user could ask next. Say which move you would lean toward and why; the user decides.

Where it goes wrong

  • Writing it after a peek. A midline table or a dashboard glance by arm shapes what gets pre-specified, however honest the team.
  • The registry entry as the plan. A few registry fields leave the estimator, families, and subgroups open until the data arrive.
  • A deviation shown as the result. A new specification reported without the pre-specified one beside it, each labeled, reads as the plan's answer.

When to bring in a specialist

Tell the user to consult a statistician or evaluation methodologist, with an independent evaluator to hold the plan where a party has a stake, when:

  • Outcome data by arm have been seen: what can still be pre-specified needs judgment, and the registry entry must say what was seen and when
  • The design is clustered, stepped-wedge, or adaptive, so the estimator is not the standard case
  • The primary outcome decides eligibility for benefits or health care

Bring them: the design, the draft plan, and a description of the data.

Cite this skill

Zezhen Wu (2026). Write the analysis plan before the data arrive (version 0.3.0) [AI skill]. Behavioral Science Skills Library, The Agency Fund and Irrational Labs. https://besci-skills.vercel.app/skills/write-pre-analysis-plan/

Skills are fixed, versioned artifacts. Record the skill name and version in your project documentation the way you would register analysis code. See how to cite skills and workflows, which follows Busara's SIFA framework for stating how humans and AI contributed.

Using this skill inside a commercial AI product sends what you type to that product's provider. Do not paste sensitive personal or proprietary data without understanding the product's terms. Read the disclosure.

Test cases

Realistic requests used to check this skill, each paired with what a good answer must contain. Maintainers rerun them with besci-eval when the skill or the AI model changes. They also show the kind of request the skill is built for.

evals/evals.jsonView on GitHub

Test case 1: Full run

The request

We are about to launch an RCT with 8,000 garment workers in Dhaka on default enrollment into a mobile-money savings wallet. Design: individual randomization stratified by factory and sex; two arms, default enrollment with opt-out versus opt-in. Primary outcome: an active savings balance (any balance above zero) at 6 months, from the provider's records; smallest effect worth detecting is 5 percentage points, set by the provider. Secondary outcomes we care about: balance amount, number of deposits, and a short survey on financial stress. Proposed subgroups: women, workers under 25, and workers who already had a wallet. The mobile-money provider is co-funding and wants to show usage went up. Nobody has seen any outcome data; baseline is done. We'll register on the AEA registry next week. Write the pre-analysis plan.

What a good answer includes

A pre-analysis plan in the output template that carries the design and outcome over, groups the secondary outcomes into families with a stated multiple-testing method, and adds detail where the provider has a stake.

Checks on the answer

  • Carries the design, primary outcome, and 5-point threshold over without changing them, and states the primary hypothesis with its direction.
  • Puts balance amount and deposits in one family and financial stress in another, each with a named way of handling multiple tests.
  • Specifies intention to treat with the strata as covariates and robust, unclustered standard errors because individuals were randomized.
  • Gives each subgroup a reason and labels it confirmatory or exploratory.
  • Names the provider's stake as a reason for detail and writes a decision rule for each range of the primary result.
  • Ends with two or three next moves, each with its reason, and questions the user could ask next, with no single instruction.

Test case 2: Missing context

The request

Write us a pre-analysis plan for our savings trial.

What a good answer includes

The skill asks for the design, the primary outcome, and whether anyone has seen outcome data by arm, and produces nothing else.

Checks on the answer

  • Asks for the design, such as the comparison, unit of randomization, and arms.
  • Asks for the primary outcome and how it is measured.
  • Asks whether anyone has seen outcome data by arm.
  • Does not produce the plan.
  • Says why it needs these answers.

Test case 3: Near the escalation point

The request

Our midline came in last month and the effect looks much bigger for women than men. Endline is in four months. Can you write the pre-analysis plan now so we can register it before endline, with women as the main subgroup?

What a good answer includes

The skill says a plan written after seeing midline results by arm is not a pre-analysis plan for those outcomes, drafts what it safely can with the women subgroup labeled exploratory, and tells the user to consult a statistician.

Checks on the answer

  • Says outcome data by arm have been seen, so the plan cannot pre-specify the outcomes already seen.
  • Labels the women subgroup exploratory for outcomes seen at midline.
  • Records what was seen at midline and when.
  • Tells the user to consult a statistician or evaluation methodologist.
  • Says the registry entry must state what was observed before registration.
  • Says what to bring to the specialist.

Test case 4: Wrong skill

The request

We haven't decided whether the primary outcome should be the number of deposits or the end-of-period balance, and the funder hasn't said what effect size would matter. Can you pick and then write the PAP?

What a good answer includes

The skill says the primary outcome and the smallest change worth detecting are not yet chosen, and points to the skill for that.

Checks on the answer

  • Says the primary outcome and the smallest change worth detecting are still open.
  • Names plan-evaluation-design.
  • Does not choose the primary outcome.
  • Does not write the plan.

References

Longer material the skill opens only when a step calls for it, which keeps the main instructions short.

references/View on GitHub

Worked example: late-payment letters from a tax authority

references/worked-example.md79 linesView on GitHub

A full run of the skill on a realistic case, showing the output it should produce.

A full run of the skill on a realistic case, showing the output it should produce. The case is illustrative, not a real program.

The request

"A tax authority and our research team are about to send one of three letters to taxpayers who declared income but had not paid by the due date. Design: individual randomization of 24,000 late taxpayers, stratified by taxpayer type (individual or firm) and whether they paid last year; three arms of equal size: no letter, a standard reminder, and the reminder plus a sentence saying most taxpayers pay on time. Primary outcome: paid any of the declared amount within 60 days of the letter date, from the authority's payment ledger. Smallest change worth detecting: 3 percentage points, set by the authority as the gain that would justify a national mailing. Nobody has seen any payment data by arm. We also care about the share of the liability paid, paying in full, days to first payment, and filing on time next year. The authority wants the norm letter to work and would like to report revenue; our team has published on norm messages before. We'll register on the AEA RCT Registry before the letters go out. Please write the pre-analysis plan."

The output

The plan commits to one primary test, paying anything within 60 days, and fixes in advance what each result leads to: the norm letter goes national only if it beats the standard reminder by 3 points or more. It adds detail where the authority and your team have a stake, so a choice made after the data arrive cannot make the norm sentence look like it worked. It needs to be registered, with this plan attached, before the first letter is mailed.

# Pre-analysis plan: late-payment letters

**Date fixed:** 2026-11-11
**Outcome data by arm (each group compared) seen before this date:** none
**Registry:** AEA RCT Registry; id to be added on registration

## 1. Design (carried over)
Individual randomization of 24,000 late taxpayers; three arms of 8,000 (no letter; standard reminder; reminder plus norm sentence); stratified by taxpayer type and prior-year payment; payment read from the ledger 60 days after the mailing date.

## 2. Hypotheses
- **H1 (primary):** A reminder letter raises the share of late taxpayers who pay any of the declared amount within 60 days, compared with no letter; the norm sentence raises it further, compared with the standard reminder.
- **H2:** The letters raise the amount paid (family A).
- **H3:** The letters raise on-time filing in the next period (family B).

## 3. Primary outcome
Paid any amount against the declared liability within 60 days of the letter date: 1 if yes, 0 if no, from the payment ledger matched on taxpayer ID. No transformation. A taxpayer with no ledger match is coded as not paid, because the ledger records every payment. Smallest change worth detecting: 3 percentage points, set by the authority.

## 4. Secondary outcome families: outcomes tested as a group
| Family | Outcomes | How multiple tests are handled | Why grouped |
|---|---|---|---|
| A. Amount | Share of the liability paid within 60 days; paid in full within 60 days | False discovery rate correction (Benjamini–Hochberg) across the two | The authority's revenue question |
| B. Next period | Filed on time in the next period | One outcome; no correction | Whether the effect lasts |
| Descriptive | Days from letter to first payment, among payers | Reported without a test | Defined only for those who pay, so arms are not comparable |

## 5. How the effect is estimated (the estimator)
- **Effect estimated:** intention to treat, by assigned arm; a returned, undelivered letter stays in its arm
- **Model:** linear regression of the outcome on arm indicators, the four strata, and last year's amount paid
- **Standard errors (how uncertainty is computed):** heteroskedasticity-robust; individuals were randomized, so no clustering
- **Exclusions:** taxpayers deregistered before the mailing date, dropped from every arm by the same rule
- **Drop-out:** none expected, since the outcome comes from the ledger; the share deregistered is compared across arms

## 6. Subgroups
| Subgroup | Variable and cut | Why the effect should differ | Status |
|---|---|---|---|
| Paid last year or not | Prior-year payment, yes or no (a stratum) | For past payers the letter is a reminder; for others it is new information, so the norm sentence should matter more for them | Confirmatory |
| Firms or individuals | Taxpayer type (a stratum) | Firms' accountants act on reminders whatever the wording, so the norm sentence should matter less | Confirmatory |
| Size of liability | Above or below the median declared liability | No prediction | Exploratory |

## 7. Decision rules
| Primary result | What the team will do | Who decides |
|---|---|---|
| At or above 3 points for the norm letter over the standard reminder | Send the norm letter nationally to late payers | The authority's compliance director |
| Standard reminder 3 points or more above no letter; norm sentence adds less than 3 | Send the standard reminder; claim no norm effect | The authority's compliance director |
| Neither letter reaches 3 points | No national mailing; publish the result in full | The authority's compliance director |

**Would stop adoption whatever the primary shows:** formal complaints or disputes from letter recipients more than double the rate among taxpayers sent no letter.

## 8. Where this plan is detailed, where it is flexible
Detailed: the primary outcome, the two confirmatory subgroups, and the decision rules, because the authority wants the norm letter to work and the research team has published on norm messages. Flexible: further covariates added for precision, and any other subgroup, each to be reported as exploratory beside the pre-specified result. A populated plan reporting every test above and every deviation will be posted on the registry with the results.

## 9. Registration
AEA RCT Registry, as the research team's journals expect; no health outcome, so no clinical registry is needed. Registered before the first letter is mailed, with this plan attached and dated, hidden until the trial is complete. The research team holds the ledger extract until the registry confirms the entry; the authority's data team sends no tables by arm before day 60.

## Open questions
- Whether the ledger match on taxpayer ID is complete for firms with more than one registration: check at baseline.
- Whether returned letters are logged; if not, the effect of being sent a letter is diluted by an unknown non-delivery rate.

## Where you could go from here
That's the pre-analysis plan.
- Register on the AEA RCT Registry with this plan attached and hidden until completion, before the first letter is mailed: a plan dated after the first payments come in no longer shows what was decided in advance.
- Put the two open questions to the authority's data team: whether firms with more than one registration match in the ledger, and whether returned letters are logged, since both affect how cleanly payment can be read by arm.
- Check with `estimate-sample-size` that 8,000 per arm can detect 3 points between the two letters, if nobody has yet: the national decision turns on that comparison, not on letter against no letter.
I'd lean toward registering, because the first mailing is a hard deadline; but if nobody has checked the sample, that check belongs before the filing, since a shortfall would change the plan.
Questions you could ask next: "What do we report if the norm letter helps past non-payers but not past payers?" · "What do we say if the authority asks for an early look at payments by arm?"

Evidence: Write the analysis plan before the data arrive

references/evidence.md42 linesView on GitHub

The sources behind the skill: what each supports, where the evidence has been tested, and what to check locally.

Sources

  • Duru, M., Sautmann, A., Turitto, J., & Welch, K. (2023). Pre-analysis plans. J-PAL Research Resources. https://www.povertyactionlab.org/resource/pre-analysis-plans Supports: what the plan is and when it is filed: it is "filed publicly, typically prior to intervention start but at the latest before data analysis begins"; "A PAP should be concise and focused, rather than attempt to be exhaustive"; "If you find you need to modify your PAP, or you overlooked something, document why you made the edit"; and the populated plan, "a separate document that populates the PAP to the extent possible and discusses any deviations from it". Also the label on anything not pre-specified: such results "should be viewed the same way as those of an observational study that did not have a PAP". Read in full.
  • Duru, M., Sautmann, A., Turitto, J., & Welch, K. (2023). Trial registration. J-PAL Research Resources. https://www.povertyactionlab.org/resource/trial-registration Supports: step 8. The AEA RCT Registry's mandatory fields include "Primary outcomes, experimental design, randomization method, randomization unit, clustering, sample size" and IRB approval; a plan can be uploaded and "may remain hidden until the trial is complete"; journals that follow the ICMJE recommendations "require pre-registration in an approved clinical trial registry", and "This requirement applies even when the research is within the social sciences". On detail: the entry should be precise for "variables or decisions that require a lot of discretion in their construction and are critical to the analysis, such as primary outcomes or subgroups for heterogeneity analysis". Read in full.
  • Banerjee, A., Duflo, E., Finkelstein, A., Katz, L., Olken, B., & Sautmann, A. (2020). In praise of moderation: Suggestions for the scope and use of pre-analysis plans for RCTs in economics (NBER Working Paper 26993). https://doi.org/10.3386/w26993 Supports: step 6. "the key benefits of a PAP can usually be realized by completing the registration fields in the AEA RCT Registry"; more detail "may be warranted" where "subgroup analysis is expected to be particularly important, or a party to the study has a vested interest", and where "the same primary outcome could be measured in several different ways". The stake can belong to "an implementing partner, a funder, or an investigator who has advanced a particular hypothesis in prior work". Also "A deviation shown as the result": a new specification should be shown with "the pre-specified analysis alongside", with each clearly labeled. Read in part: the abstract, the benefits and costs of plans, and the questions and answers.
  • Brodeur, A., Cook, N. M., Hartley, J. S., & Heyes, A. (2024). Do preregistration and preanalysis plans reduce p-hacking and publication bias? Evidence from 15,992 test statistics and suggestions for improvement. Journal of Political Economy Microeconomics, 2(3), 527–561. https://doi.org/10.1086/730455 Supports: writing a plan, not only a registry entry, and "The registry entry as the plan". Preregistration "frequently does not involve a preanalysis plan (PAP), or sufficient detail to constrain meaningfully the actions and decisions of researchers"; the authors find "no evidence that preregistration in itself reduces p-hacking and publication bias", and, with a plan, "evidence consistent with both reduced p-hacking and reduced publication bias". Abstract only.
  • Duru, M., & Kopper, S. (2023). Data analysis. J-PAL Research Resources. https://www.povertyactionlab.org/resource/data-analysis Supports: steps 4 and 5. Related outcomes can be aggregated "into a single index", or the plan can use a method "controlling the family-wise error rate or false discovery rate", including the Benjamini–Hochberg method; standard errors are clustered "at the level at which treatment was assigned"; stratification variables are included as controls when the probability of treatment varies by stratum; and attrition is checked for "systematic differences in attrition rates between those in the treatment versus those in the control groups". Sections on these topics read.
  • Anderson, M. L. (2008). Multiple inference and gender differences in the effects of early intervention: A reevaluation of the Abecedarian, Perry Preschool, and Early Training Projects. Journal of the American Statistical Association, 103(484), 1481–1495. https://doi.org/10.1198/016214508000000841 Supports: step 4. Combines "summary index tests with familywise error rate and false discovery rate corrections", and concludes it "can be important to declare the family of tests under consideration and to either consolidate measures or report adjusted and unadjusted p values". Abstract only.
  • Benjamini, Y., & Hochberg, Y. (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B: Statistical Methodology, 57(1), 289–300. https://doi.org/10.1111/j.2517-6161.1995.tb02031.x Supports: step 4. Controls "the expected proportion of falsely rejected hypotheses", with a gain in power over controlling the familywise error rate. Abstract only.
  • Kettle, S., & Persian, R. (2022). Target, Explore, Solution, Trial, Scale: An introduction to running simple behavioural insights projects. The Behavioural Insights Team. https://www.bi.team/wp-content/uploads/2022/11/BIT-Handbook-How-to-run-simple-BI-projects.pdf Supports: the task, as "Pre-specify the analysis": "defining the type of regression analysis you will run, including the control variables you might include, and the subgroups you want to look at", and the note that subgroups must be identifiable "with the data you have available". Chapter 4 read in full.
  • Olken, B. A. (2015). Promises and perils of pre-analysis plans. Journal of Economic Perspectives, 29(3), 61–80. https://doi.org/10.1257/jep.29.3.61 Supports: the replication note. A plan can specify "variables, data cleaning procedures, regression specifications", and if researchers report all pre-specified results "data-mining problems are greatly reduced"; Olken also reviews evidence that "the benefits of using pre-specified analysis plans may not be as high as one might have expected initially". Abstract only.
  • Coffman, L. C., & Niederle, M. (2015). Pre-analysis plans have limited upside, especially where replications are feasible. Journal of Economic Perspectives, 29(3), 81–98. https://doi.org/10.1257/jep.29.3.81 Supports: the replication note. The authors argue "enthusiasm for pre-analysis plans should be tempered". Abstract only.

Two things are this skill's own and come from no source: the decision rules, which make the plan usable by a program as well as by a journal; and the rule that two primary outcomes are treated as one family with a correction.

Where it has been tested

Searched November 2026, for systematic reviews and studies of whether pre-registration or pre-analysis plans change what trials report. No systematic review was found. The skill is a procedure and makes no claim about how program participants behave, so this table records where its sources come from and the studies of the practice itself.

Source Type Countries Finding
Brodeur et al. (2024) Study of 15,992 test statistics from trials in 15 leading economics journals; abstract only Not stated in the abstract No evidence that registration alone reduces p-hacking or publication bias; evidence consistent with reductions when a pre-analysis plan accompanies the registration
Ofosu & Posner (2023) Review of 195 plans from the EGAP and AEA registries, 2011 to 2016, and 93 papers that followed; abstract only Not stated in the abstract "Significant variation in the extent to which PAPs registered during this period accomplished the goals they were designed to achieve"
Casey, Glennerster & Miguel (2012) Randomized evaluation that used a pre-analysis plan; abstract only Sierra Leone The authors show that without the plan they "could have generated two divergent, equally erroneous interpretations of program impacts"
Banerjee et al. (2020) Guidance from researchers and editors; read in part Written for trials in any country Argues the registry fields usually suffice, with more detail in three cases
Duru et al. (2023) Research guidance; read in full Written for trials in any country Describes practice; reports no test of it

What depends on the place is practical: which registry a funder, journal, or ethics board requires; whether ethics approval must come before registration; and whether the data structure the plan assumes (IDs that link rounds, cluster identifiers, the baseline variables named as covariates) exists.

Replication

Contested on how much to fix in advance. Olken (2015) and Coffman and Niederle (2015) set out the costs and argue the benefits may be smaller than expected; Banerjee et al. (2020) argue the registry fields usually suffice; Brodeur et al. (2024) found that registration alone showed no sign of reducing p-hacking while registration with a plan did; and Ofosu and Posner (2023) found that early plans varied widely in whether they were precise enough to do their job. Not contested: whatever is pre-specified must be written before outcome data are seen.

What to check locally

  1. Which registry the funder, journal, or ethics board requires, and whether health outcomes bring in a clinical trial registry.
  2. Whether any arm-level tabulation has already circulated, including on a dashboard.
  3. Whether the variables named as covariates and subgroups exist in the baseline data, with IDs that link to the outcome data.
  4. Which party has the strongest stake in the result, so the plan is detailed where the pressure will be.

Version history

What changed in each version, newest first. An entry that answers an issue or review links to it.

CHANGELOG.mdView on GitHub

0.3.0 - 2026-11-11

Follows the conversational-voice standard. The plan opens with a few plain sentences to the user: what it commits to, where it adds detail because someone has a stake, and that it must be registered before anyone sees outcome data by arm. "Estimator" is now "How the effect is estimated (the estimator)", and "arm", "outcome families", and "standard errors" are glossed where they first appear; the title keeps "pre-analysis plan", the term registries use. The output ends with next moves and their reasons, chosen from candidates listed in the closing, and the skill carries the shared voice block. The method is unchanged. Edited with Claude.

0.2.0 - 2026-11-11

Rewritten to the November 2026 standard, with one job: fixing the analysis before the data arrive. The plan now names the multiple-testing method for each outcome family itself instead of handing it to another skill, checks which registry applies (including the clinical-registry rule for health journals), and draws on Brodeur et al. (2024), who found that registration alone showed no sign of reducing p-hacking while a full plan did. Citations were re-verified: Banerjee et al. (2020) now lists its six authors, and the OES template and EGAP guide were dropped. Rewritten with Claude.

0.1.0 - 2026-10-12

First draft. Drafted with Claude from a verified evidence dossier for Zezhen Wu's review; four evals; not yet reviewed.

Reviews

Expert reviews come from behavioral scientists at The Agency Fund and Irrational Labs and are kept as issues on GitHub; each shows whether a later version of the skill answered it. Ratings and comments come from anyone who has used the skill.

Expert reviews

Expert reviews of this skill are kept as issues on GitHub.

See all expert reviews of this skill on GitHub

Ratings and comments

Ratings show here once the site can reach its database.