Reproducible Research › Module 1: The problem

Future you is a stranger

Lesson 3 of 3 · 2 min

Previous

The person most likely to rerun your analysis is you, six months from now. And future you won't remember which file was final, which cells you ran in which order, or why you dropped those rows.

What gets lost

  • Which version of the data was used.
  • Steps done by hand: a filter in Excel, a manually deleted row.
  • The order notebook cells were run in.
  • Why a setting was chosen.

A real spreadsheet disaster

In 2010, two Harvard economists published an influential paper suggesting that high government debt was linked to much slower growth. In 2013, a graduate student, Thomas Herndon, tried to reproduce it using their spreadsheet. He found, among other issues, that a formula had accidentally left out several countries. Corrected, the dramatic slowdown largely disappeared. The paper had already been cited in real policy debates.

Habits that help future you

  • Script everything instead of clicking. A script is a record of what you did.
  • Write a README at the start: what the project is, how to run it.
  • Keep a lab notebook (a simple dated text file) of decisions and why.
  • Restart and run all before trusting a notebook's output.

RememberWrite for future you as if they were a stranger: they'll need every step written down.