Skip to content

Material presented iin the Summer 2022 CFE Empirical Workshopas

Notifications You must be signed in to change notification settings

zachporreca/data_basics_in_R

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data Basics in R at CFE Empirical Workshop

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:

  1. Download the main data files and code from this repository and set the folder you put those in as your working directory
  2. Download the incident level data file from the google drive link: here
  3. Install the following packages for R:
    1. haven
    2. fixest
  4. 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.

About

Material presented iin the Summer 2022 CFE Empirical Workshopas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages