I’m an Economist: How Much Coding Should I know?

Whether you’re looking for a job in economics, exploring a new hypothesis, or working to publish your first paper, you might wonder: can you do this in excel? And if not, how much coding should you learn, and how will you learn it? By Kurt Semm

Five years ago, I was studying Romantic literature, and writing my sonnets. Now, I’m a Junior Economist, a Ph.D. Candidate, and comfortable coding in LaTex, Python, R, & Stata. Looking back, there were plenty of pitfalls along the way, and many of them could have been avoided with a little extra guidance.

In an attempt to spare others the struggle, I set out to determine the best rules of thumb in a recent episode of YSI’s Early Career Time

I called in the help of three experts:
  • Thomas Herndon, professor of economics at John Jay CUNY in New York. During his grad school years, he famously caught a simple excel mistake in “Growth in the Time of Debt” by Reinhart and Rogoff. 
  • Pier-André Bouchard St-Amant, a mathematician with a Ph.D. in economics who ­specializes in the analysis and optimization of public policy reforms and business practices. He teaches quantitative methods and data science at ÉNAP.
  • Tim Fong, a data scientist whose Silicon Valley experience has ranged from computer vision to net worth data. He has an M.S. in statistics from Baruch College and a JD from the USF School of Law. His economic interest are in post-Keynesian price theory.
Listen to the whole conversation here, or keep reading for their 10 biggest tips. 
  1. Don’t be intimidated. Coding just means telling computers what you want them to do. It comes down to making calculations, opening files, opening or closing loops, and creating tables or graphs.

  2. Don’t use excel. Government organizations might do this, but it can lead to a lot of errors. And imagine scrolling over 1,000,000 observations in a single spreadsheet.

  3. Choose one language to start with. Master it, and only then branch out to others. Academic economists tend to prefer Stata because it’s best for running regressions. R is helpful with cleaning Data & makes beautiful plots/graphics (ggplot2). Python is popular in the private sector.

  4. Stay organized. Remember to create a solid file system before you start coding, and make sure to write notes to yourself about what your code is doing. This will help your future self to replicate your work.

  5. Go deep. See if your school, University, or Program teaches a Computer Science Class. These often give you a more in-depth understanding than online certification courses. And the certificates don’t tend to matter that much.

  6. Say bye to Microsoft Word. If you’d like to get published, you’ll need to learn LaTex. It helps create nice-looking summary statistics and saves you a lot of time in the formatting stage of your research.

  7. Expect frustration. There will be times you’ll want to throw your laptop against the wall. Coding is frustrating because errors are inevitable. It never works the first time. Keep at it, and you’ll get through.

  8. Think carefully about your research question first
    If you want to get through the frustration, you need to care about your research question. Don’t study a question if you don’t care about the answer. Look for something that scares you a bit. 
  1. Remember that it’s just a tool
    Any coding should be in service of your ideas, which are probably nuanced, complex, subjective, and evolving. Don’t reduce your ideas to the level of your coding skills. Improve your code to serve your ideas.

  2. Enjoy the journey. There is a lot to learn, and many resources out there to help you. Here’s a small selection:

Listen to the full conversation here.

About the Author: 
Kurt Semm is a Junior Economist at the Institute of New Economic Thinking. Simultaneously, he is a Ph.D. Student at the New School for Social Research. He received his BA at St. John’s University in Literature and Economics and an MS from the New School for Social Research. His main areas of research are Ecology, Political Economy, and Water Resources. His research deals with water management and allocation, regional development, and equity, with a particular interest in the Southwest United States.

Thought this was interesting?
Keep an eye out for more episodes of YSI’s Early Career Time. Each one explores a challenge in publishing, teaching, the job market, work-life balance, and the various institutional barriers young researchers face. If there’s a topic you’d like us to take up, let us know in the comments below.

Author: Guest Post

Outside contributors are welcome at EQ! If you'd like to have your work featured, please go to Contribute to see what we look for in a post.