This repo has material for an introduction to the R programming language, with applications to economics.
Here I'm collecting some useful resources for learning more.
Good books for beginners
- R for Data Science: Import, Tidy, Transform, Visualize, and Model Data
- An Introduction to Statistical Learning: with Applications in R. This book is a little more advanced, but is considered a classic for those interested in machine learning.
- For time series analysis, consider Introductory Time Series with R and Practical Time Series Forecasting with R: A Hands-On Guide
Other Resources
- Basic R Data Types
- There is a book called "Applied Econometrics in R" that is very helpful. It also has an R package containing code and data to go along with the book.
- Useful tutorials on econometric procedures in R and Stata. In particular, there is a Difference-in-Difference tutorial, Fixed/Random Effects, Logit, Time Series
Data Wrangling and Data Science in R
- Data Wrangling Cheatsheet using R's tidyr and dply, from RStudio
- Tidyverse for Beginners Cheat Sheet
- R for Data Science Book
Pandas and R
Pandas is a widely used Python package for data analysis. It serves as a useful comparison for similar R packages.
- Comparison of Pandas and R from Pandas Documentation
- Translation of some of R's
dplyr
expressions to Pandas
Here are a few econometrics textbooks that I find helpful and recommend.
- A Guide to Econometrics, by Peter Kennedy. This is a great econometrics book. It's not a textbook. Rather, it's a guide that provides a lot of of "big-picture" discussion of various econometric procedures. It's a nice companion to another textbook. It has very few equations and rather focuses on discussing the ideas behind different techniques and procedures.
- Econometrics, by Fumio Hayashi. This is the book that I mentioned that takes the unique pedogogical approach of deriving most common econometric procedures as special cases of the generalized method of moments (GMM). The idea is that if you first learn GMM, then you can learn many other techniques better and quicker by understanding how they can be derived from the fundamental principles in GMM.
- Econometric Analysis of Cross Section and Panel Data, by Jeffrey M Wooldridge If you're interested in pursuing graduate school in economics, this is a highly regarded textbook. As the title implies, there is some emphasis on panel data models (which are quite important in many fields).
- Introduction to Econometrics (3rd ed.), by Stock and Watson A good introduction to econometrics. Many undergraduate introductory econometrics courses use this book. (I assume that most of you have this book already.)
- Structural Macroeconometrics (2nd Ed.), by DeJong and Dave I have found this book to be very useful. If you're interested in macroeconomics, this is a nice textbook to read through.
- Playlist of videos for (learning Git with GitKraken)[https://www.youtube.com/playlist?list=PLe6EXFvnTV7-_41SpakZoTIYCgX4aMTdU]
Pandas Resources
- Pandas Cheat Sheet from PandasDev
- Pandas Cheat Sheet from DataCamp
- Adding and Subtracting Time:
- Timedelta: https://pandas.pydata.org/pandas-docs/stable/timedeltas.html
- Accounting for leap years when subtracting a year---comparing
DateOffset
anddateutil.relativedelta
: https://stackoverflow.com/a/31169977/1411791