/da_case_studies

Codes for case studies for the Bekes-Kezdi Data Analysis textbook

Primary LanguageJupyter Notebook

Data Analysis Case Study codebase for R, Python and Stata

R, Python and Stata code for
Data Analysis for Business, Economics, and Policy
by Gábor Békés (CEU) and Gábor Kézdi (U. Michigan)
Published on 6 May 2021 by Cambridge University Press
gabors-data-analysis.com

How to use

On the textbook's website, we have detailed discussion of how to set up libraries, get data and code: Overview of data and code

To see options for various languages, check out:

  1. R -- How to run code in R
  2. Stata -- How to run code in Stata
  3. Python -- How to run code in Python

Status (15 July, 2021)

The Latest release v0.8.0 is available as of 16 July 2021.
There will be additional bugfixes, edits, and v1.0.0 expected in September.

  1. R -- All code ready. Used for graphs in textbook. An environment with all librariries necessary, as renv is now available.
  2. Stata -- All code ready. In the lack of native machine learning capabilities, no code for chapters 15,16,17, some limitations for chapter 18. This shall change, once we test the new python link-ups. Only planned for version v1.1.0 expected late 2021.
  3. Python -- Allmost all codes are ready. Moderate differences to book and R are in ch14-ch17, some additional checks planned. An environment with all librariries necessary, as pipenv is now available.

Organization

  1. Each case study has a separate folder.
  2. Within case study folders, codes in different languages are simply stored together.
  3. Data should be downloaded and stored in a separate folder.

Code language versions

  1. R -- We used R 4.0.2.
  2. Stata -- We used version 15, allmost all code should work in version 13 up.
  3. Python -- We used Python 3.8.0.

Get data

Data is hosted on OSF.io

Get data by datasets

Found an error or have a suggestion?

Awesome, we know there are errors and bugs. Or just much better ways to do a procedure.

To make a suggestion, please open a github issue here with a title containing the case study name. You may also contact us directctly. Cheers!