Websites

The internet is filled with R resources. (Case in point, this website!) Here are a few non-obvious ones to new users:

  • CRAN Task View: Econometrics. An encyclopedia of R functions and packages for econometrics.
  • Stack Overflow. A free Q&A website for coding questions. Possibly one of the most valuable public goods on the internet.
  • TidyTuesday. New and interesting data sets released every week by the people who made the tidyverse.
  • Follow the latest R developments on Twitter using the hashtag #rstats.

Packages

There are over 17,000 packages and counting on the CRAN network. Fortunately you can get by with just a few. Here are some to consider. Each package is installed by typing install.packages("packagename") in the console (more instructions here).

Analysis

Alongside the tidyverse, here are some useful packages for econometrics.

  • sjPlot for regression tables and regression plots. If you just want to generate predictions from regression models check out ggeffects (an input to sjPlot).
    • Another great package for model visualization is modelsummary
    • broom is a great package for “tidying” model results into data frames.
  • patchwork for combining multiple ggplot objects into one figure.
  • plm for panel data econometrics.
  • lmtest for coefficient tests on linear models. You can combine this with sandwhich to cluster standard errors.
  • forecast for time series econometrics.
  • fixest for linear models with fixed effects and clustering.

There is also tidymodels a collection of packages for econometrics and machine learning.

Data

  • fabricatr for simulating fake data.
  • fredr gives you access to the FRED (Federal Reserve Bank of St. Louis) database. tidyquant provides access to Yahoo Finance and other financial data sources.
  • fivethirtyeight provides over 100 data sets featured on the sports/politics/etc. blog fivethirtyeight.
  • wbstats for World Bank data.
  • ipumsr for IPUMS census and survey data.
  • Lahman provides access to a wide variety of baseball data.
  • Access Twitter data (tweets, etc.) with rtweet.
  • tidycensus for U.S. Census data.
  • nhanesA provides access to National Health and Nutrition Examination Survey (NHANES).
  • Ecdat for a bunch of other econometrics data sets.

Check out Awesome Public Datasets for other datasets on economics and much more.

Books

  • R for Data Science is the standard introductory text to data science with R and the tidyverse. If you only work through one book, make it this one.
  • Modern Dive is another (and longer) introduction to R and the tidyverse.
  • Econometrics with R is a great text for econometrics (though it does not use the tidyverse).
  • Advanced R. For advanced users who really want to hone their skills.
  • R Markdown Definitive Guide. The definitive guide!

Job Market Signaling

You have the skills. But anybody can write the letter “R” on their resume. So how do you separate from the pack? Here are two ideas:

  • Build a personal website entirely in R Studio using blogdown. The website itself is a credible signal (costly for anyone produce, and costlier for those less skilled). You can also post your senior thesis (along with an executive summary) and class projects to showcase your work! Here is a demo we built in about one hour during a department workshop in Spring 2020 (thanks to this excellent Twitter thread).
  • Post your code on GitHub, the leading platform on the internet for open source software.