Hey guys, it was fun getting to trying to show you around some of the basic R stuff with an applied approach.
The data file I was using are all here in this repository.
To replicate what we went over today you will need to do the following:
- Download the main data files and code from this repository and set the folder you put those in as your working directory
- Download the incident level data file from the google drive link: here
- Install the following packages for R:
- haven
- fixest
- The code is commented out so you are able to see what each section is intended to do/ what question it is answering
Packages for R can be installed as follows:
1) In RStudio's top menu choose "Tools"
2) Select "Install Packages" from the drop down menu
3) Enter the names of the packages you'd like to install (seperating each by a comma)
4) Ensure that the "Install dependencies" box is checked
5) Click install
Play around a bit, and try replicating some of the code on your own data!
As a note, the panel data used here is from Abrams (2012) paper on criminal deterrance and the incident-level microdata utilized is taken from Philadelphia's Open Data portal. It is the incident-level crime data for the year 2019.