results-trace

Traces every reported number in a manuscript, including table cells, figure values, and numbers in the running text, to the script line and output file that produced it, compares the reported value wi

SKILL.md

GitHub

Results Trace

A replication package can run cleanly and still not produce the paper. In-house review at one political science journal found that 14 of 24 papers reported results that differed from what the authors' own code generated (Eubank 2016), and a reproduction of 110 economics and political science articles found transcription problems in 13 (Brodeur et al. 2026). The cause is ordinary: a number typed into the manuscript by hand stays put when the analysis changes. This skill checks the manuscript against the outputs one value at a time.

Related skills. replication-package checks that the package is complete, runs, and maps each figure and table to a script. figure-table-audit checks that the text agrees with the exhibits. This skill checks that the exhibits and the text agree with the output files, and that every number has a producer. Run replication-package first if the package has never been run end to end.

Ground rules

  • Trace the manuscript that will be submitted. A project often holds a frozen copy and a live one. Read the project's guide files, establish which is current, and say which you traced.
  • Compare against outputs on disk, and say how fresh they are. A trace is only as good as the outputs it reads. If an output was last written before the script or data that produce it last changed, the comparison may be against a stale result; report that before any mismatch. File times are unreliable after a sync or a fresh checkout, where everything shares one timestamp. Use git log on the script, the data, and the output where the project is under version control, and say so when freshness cannot be established.
  • Do not run the author's code unasked. Reading files is safe. Regenerating outputs executes the analysis on this machine and may take hours or overwrite results. Ask once whether to regenerate, naming the master script; on anything short of yes, trace against the existing outputs and record the regeneration as NOT CHECKED. Regenerating does not help where a script saves no numeric output at all; that is a finding, below.
  • Report both values, never a verdict alone. Each mismatch gives the manuscript value, the output value, and where each was read. The author decides which one is right; the manuscript is not always the one in error.
  • A number read off a figure is not traced. Trace a figure through the data file or model object the plotting code reads. Where the plotting script writes only an image, look for another script that computes the same quantity from the same data with the same model call and saves it; a value confirmed that way is traced indirectly, and the trace says which script was the stand-in. If nothing numeric exists anywhere, mark the value NOT CHECKED. Either way, report that the figure's own script saves no numbers.
  • Change nothing. Write the trace to a new file. Do not edit the manuscript, the code, or the outputs.

Step 1 — Inventory the reported values

Read the manuscript source (.tex, .md, .qmd, .Rmd, or .docx), the supplement, and the tables it inputs. List every quantitative claim:

  • every cell of every table, with its row and column labels;
  • every value a figure displays, taken from the object the plot is drawn from, interval endpoints included;
  • every number in the running text, abstract, and footnotes: estimates, standard errors, intervals, p-values, sample sizes, percentages, counts, and derived statements such as "twice as large" or "a 12-point gap";
  • every claim that rests on numbers without printing them: a direction ("narrows the gap"), a comparison ("larger in one country"), a null ("no difference"), and a statement of what a model includes or which sample it uses ("the full sample", "all eight attributes"). Record the values and the code each one depends on. In practice these produce the most consequential findings.

Give each an ID, its location, the value as printed, and its printed precision. Skip years, section numbers, citations, and design constants the analysis does not compute, and say that you skipped them. Sample sizes and exclusion counts are computed values; keep them.

Note how each value entered the manuscript. A value produced by inline code, an \input of a generated table, or a generated macro file is dynamic: it follows the output that defines it, and tracing it means checking that the generating file is current and still compiles in the manuscript. A value typed as a literal is static, and static values are where the errors are. A generated file can still carry a literal: a script that types an N into a caption or a note has written a static value into a dynamic table, so read the generator.

Step 2 — Find the producer of each value

For each value, locate three things: the script and line that computes it, the output file it is written to, and the data it is computed from. Start from the package's README and crosswalk if they exist, then confirm in the code; a crosswalk says what the author intended, and the code says what happens. The Social Science Data Editors' README template asks authors for exactly this list, with the program and line number for each table and figure, and the AEA's replicators build one for every in-text number as well.

Classify each value:

  • traced: a script line writes it to an output file that is on disk;
  • derived: computed from traced values by arithmetic the manuscript states or implies (a difference, a ratio, a percentage of N). Recompute it and record the formula;
  • untraceable from public materials: its producer exists but depends on data that are restricted or absent. Name the data;
  • outside the pipeline: only code that the master script does not call produces it, such as a legacy notebook. Treat it as unverified and name the file;
  • orphan: no code produces it. This is the main finding. An orphan is a number someone typed after running something interactively, copied from an older draft, or computed in a spreadsheet.

Step 3 — Compare

For every traced or derived value, read the output and compare it with the manuscript at the manuscript's printed precision.

  • Match: the output rounds to the printed value.
  • Rounding: the values agree to within one unit in the last printed digit, or the manuscript truncated where it should have rounded. Report it; journals that verify will.
  • Transcription: digits transposed, a neighboring cell's value, a stale value from an earlier run, a sign dropped.
  • Substantive: a different sign, significance level, sample size, or a difference that would change a sentence in the paper.

Class by consequence first: substantive outranks transcription, which outranks rounding. A value that sits within rounding of the output but comes from a different model or sample is substantive.

There is no general tolerance for a reproduced value. Deterministic code should reproduce exactly. Where a result depends on simulation or resampling, check that a seed is set once and recorded; without one, say so and report the size of the difference. One journal that verifies allows up to five percent for unseedable simulations, and a published value-by-value audit used ten percent as the line between minor and major discrepancies (Hardwicke et al. 2021). Cite a threshold only as someone's rule, not as a standard.

Also check each table and figure as a whole: the same rows and columns as the output, the same N, the same model in each column, and labels that match the variables the code uses. Check the text's description of each exhibit against the code that draws it: the sample, the covariates, the subgroup. A table whose cells all match but whose column header or describing sentence names a different specification is a substantive error.

Step 4 — Consistency checks that need no code

These catch errors in values the trace cannot reach, and they cost nothing:

  • A p-value should follow from its reported test statistic and degrees of freedom. Recompute it (the check statcheck automates; Nuijten et al. 2016).
  • A mean of integer-valued data with a small N can only take certain values. Check that the reported mean is possible for that N (GRIM; Brown and Heathers 2017), and likewise for standard deviations (GRIMMER; Anaya 2016). Apply these only where the item is integer-valued and N is small enough for the test to bite.
  • Percentages should correspond to a whole number of cases out of the stated N, and subgroup Ns should sum to the total.
  • An interval should contain its estimate and match the stated standard error and confidence level.
  • The design fixes some counts. Respondents times tasks times profiles should equal the rows analyzed, less stated exclusions; in a forced choice, chosen profiles are half the rows; arms should sum to the sample.

A failed check is a prompt to look, not proof of an error: rounding of the inputs can produce a small inconsistency.

Output

Write results-trace.md beside the manuscript, without overwriting an earlier trace:

Summary: <manuscript traced; N values; N traced, N indirect, N derived, N orphan, N untraceable; N mismatches by class; N exhibit or claim mismatches; outputs fresh, stale, or unknown>

## Freshness
| Output file | Last written | Producer last changed | Basis (git or file time) | Fresh, stale, or unknown |

## Mismatches            (substantive first, then transcription, then rounding)
| ID | Location | Manuscript | Output | Class | Script:line | Output file |

## Exhibit and claim mismatches   (a description, sample, or specification that the code contradicts)
| ID | Location | Manuscript says | Code or output shows | Script:line |

## Orphans
| ID | Location | Value | Nearest candidate source, if any |

## Not traceable from public materials
| ID | Location | Value | Data required |

## Consistency checks
| ID | Check | Reported | Recomputed | Note |

## Trace table           (every value)
| ID | Location | Value | Static or dynamic | Script:line | Output file | Status (traced, indirect, derived, outside pipeline, orphan, untraceable, NOT CHECKED) |

The trace table doubles as the list of tables, figures, and in-text numbers with their programs that verifying journals ask for in the README.

Then say, in a few lines, what would stop the errors recurring: which static values could be generated instead. Inline code in Quarto or R Markdown, a script that writes LaTeX macros for the manuscript to \input, and generated tables from esttab or its equivalents each remove a class of transcription error. Offer this as a follow-up, not as part of the trace.

Sources

Social Science Data Editors, Template README and Guidance. AEA Data Editor, replication report template and Data and Code Availability Policy. Reproducibility guidelines of the American Political Science Review, American Journal of Political Science (2023), Journal of Politics, and Political Analysis (2025). Eubank (2016). Brodeur et al. (2026). Trisovic et al. (2022). Hardwicke et al. (2021). Nuijten et al. (2016). Brown and Heathers (2017). Anaya (2016). TOP Guidelines (2025). Full entries are in SOURCES.md.