Economics in R
What is this?
"Economics in R" is a book-in-progress intended for young economics graduate students. Much of my time in grad school was spent writing bad code. Time that could have been spent doing more productive things (Like finding another set of null results or figuring out why my model won't converge). This book walks through the basic tools needed to start economics research using the R programming language. This book assumes that you know the methods needed to find results (e.g. difference-in-differences, the RBC model). But you may not know how to implement those methods using statistical software. Disclaimer: I'm still not a professional coder, but hopefully this helps you save a lot of the time that I wasted!
To get young researchers up-and-running as quickly as possible, this book is laid out as follows:
Microeconomic Methods (Incomplete)
A quick note on navigation. This page will now be referenced as the "Table of Contents." There is a button at the top and bottom of each chapter to return here. This is so you can navigate quickly to chapters that are most relevant for you. You can also use the navigation pane on the side bar. If a chapter doesn't apply to you, just skip it. If you're unsure whether to skip a chapter, detailed contents are below.
If you're completely new to R, click the Introduction button below. Otherwise, select the chapter you want to visit from the list above or below.
Detailed Contents
Why R?
Downloading R
RStudio Interface
Data Types and R-Objects
Packages
Writing Code
Using data.tables
Saving Files
Data Mining and Cleaning
Data Mining
Data Transformation
Writing Data
Data Analysis
Correlations
Regressions
Residuals
Introduction to ggplot
Scatterplots
Line Graphs (Simple)
Line Graphs (Average over Groups)
Histograms
Microeconomic Methods (Incomplete)
Fixed Effects
Instrumental Variables
Difference-in-differences
Event Studies