# Resources

On this page I provide links to learning resources I find very useful. This is surely not an exhaustive list. I’ll add to this list when I come across interesting resources.

## Learning R

R comes with a steep learning curve but opens up a lot of possibilities for its users. You don’t need to learn each and every command — no one is able to do that. The best you can do is learn the basics, get started with a project and learn by doing. And then practice, practice, practice.

There are almost endless resources on R on the web. Here are some resources I recommend:

#### Videos

Nick Huntington-Klein has excellent videos on R for econometrics and many other topics.

Albert Rapp’s website and YouTube channel is a treasure trove for tips and tricks with R, especially for data wrangling, visualisation, and outputs with Quarto.

#### Textbooks and websites

Here is a free e-book with an introduction to base R. R has gotten a lot more user friendly with the introduction of tidyverse. However, if you want to become proficient in R, knowing base R is very helpful.

R for Data Science by Hadley Wickham and Garrett Grolemund is THE standard textbook for working with tidyverse.

For econometrics, I recommend two e-books: 1) Introduction to Econometrics with R, an introductory e-book based on the Stock & Watson textbook, created by Christoph Hanck, Martin Arnold, Alexander Gerber, and Martin Schmelzer. 2) Introduction to Econometrics with R, a free e-book by a team of professors from Sciences Po (Florian Oswald, Vincent Viers, Jean-Marc Robin, Pierre Villedieu, Gustave Kenedi). The book combines everything you need: an introduction to R, econometric theory, coding examples, etc.

The R Graph Gallery by Yan Holtz provides examples (visual and code) for pretty much any graph type under the sun.

Telling Stories with Data by Rohan Alexander is a free e-book aimed at data scientists. It offers lots of excellent examples about workflows, exploratory analysis, modeling and applications.

Allison Horst’s page on data wrangling with dplyr is excellent. Come for the coding, stay for the penguin illustrations.

R is great for

**text analysis**. You can learn tidytext in this excellent tutorial by Julia Silge. A more comprehensive package on text analysis is Quanteda, which has been co-written and is co-maintained by Stefan Müller. Stefan is also based at UCD and does very cool work at the intersection of political science and data science. See here for an example.Grant McDermott’s materials on Data Science for Economists have lots of interesting material on workflow, processing of large data (high-performance computing, Spark, Docker), and database management.

Jon Hersh’s course on Machine Learning for Economistscovers the basics of machine learning in a very intuitive way.

## Causal Inference

#### General

The Nobel Prize 2021 was given to three masters of causal inference: David Card, Joshua Angrist, and Guido Imbens. Here is a video of a lecture to UCD undergraduate students I’ve given the day after the prize was announced.

It is difficult to stay up to date with all the new methods in applied econometrics. Here is a fantastic public good by Christine Cai, who maintains a document with abstracts and references of methods papers of the last 5-6 years. Link here.

Paul Goldsmith-Pinkham has an excellent course on applied empirical methods (basically causal inference), with YouTube videos and lecture slides.

Want to use causal inference with Python? Check out Matheus Facure’s free e-book Causal Inference for the Brave and True.

#### Specific Methods

- Jonathan Roth provides excellent slides on new
**diff-in-diff**methods, along with coding exercises and R packages. Also, see Ajad Naqvi’s website listing the various diff-in-diff packages in R, Stata and Julia. - Matias D. Cattaneo, Nicolas Idrobo, Rocio Titiunik have an excellent review article on
**regression discontinuity designs**. - Peter Hull’s course materials on
**instrumental variables**.