Skip to content

Thoughts on How Economists Can Avoid Reinventing the Wheel

The Problem

In writing research papers, economists solve the same problems over and over again.

Code Examples

  • Drawing joint Normal random variables with fixed standard deviations (e.g. agents' endowments).
  • Coding common production functions (nested CES).

Data Examples

  • Constructing individual histories of earnings / schooling using NLSY / PSID data.
  • Consistently constructing measures of schooling / earnings across year in CPS / Census / ACS data.

The list is endless.

The Solution

Consider what other disciplines do.

People who work on numerical math have access to a set of trusted code libraries (BLAS, NLopt, ...).

There is a mechanism through which users can contribute to code (github) or discuss it (e.g., stackexchange).

Consider the development of the Julia language.

  • All the code libraries live on github.
  • The major packages are moderated by groups who take responsibility for the code's correctness.
  • All code comes with automated tests.

The result: Much of the time when users ask questions on how to solve a problem in Julia, someone will simply point to an existing library.

Economics needs a similar setup for code and for data.

Instead of creating the same variables over and over again from each of the major datasets, there should be a place where the construction of such variables can be discussed and where code for constructing variables can be posted (and trusted).

The Organizational Problem

Why does this not happen?[^QuantEconFn]

Because there is no payoff for individuals to run such an effort.

Can this problem be solved?

As a small first step, I have started to post reusable code I wrote at github.

[^QuantEconFn]: A partial exception is QuantEcon, which is organized by Sargent and Stacchurski. But it is not an open repository.