Skip to content

About

Reproducible Code for "The capital share and income inequality: Increasing gaps between micro and macro data"

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

Repository files navigation

income-under-the-carpet

Here you will find all the necessary STATA code and data to reproduce results from: "THE CAPITAL SHARE AND INCOME INEQUALITY: INCREASING GAPS BETWEEN MICRO AND MACRO-DATA" by Ignacio Flores, published in the Journal of Economic Inequality

Instructions

Download the whole project and run the 0_run_everything.do file, which will run -you guessed it- everything. But, before doing it, remember to replace the 'mydirectory' global in line 14 to wherever you put the folder. Pretty simple, right? Also, it will produce the file 'tables/data-behind figures.xlsx' which has tables with the data used to build figures in the paper. Please don't forget to cite the paper if using data and/or code.

National accounts data

You can find the most up-to-date data in the following link: http://data.un.org. I scrapped it with some R code, which I will not share because I am not the author. However, you can find all the tables that I used in the project (and more) in the "Data/UN/" folder. Accronyms in the names of files refer to the different institutional sectors: G -> Government; HH -> Households; NPISH -> Non-Profits Serving Households; SF-> Financial Corps; SnF -> Non-Financial Corps.

LIS data

All survey data comes from the Luxembourg Income Studies (LIS) database, for which direct access to microdata is forbidden due to confidentiality agreements between LIS and national statistical offices. To work with it, you have to send them code via an interface. The STATA version is limited to retrieve information only from the log. The rationale is thus to organise the information in the log as something that makes sense as a .csv file, to then be able to copypaste it and use the data (ccyy.csv and ccyy2.csv in the Data/ folder). The do-file I used to retrieve the main survey data is 0a_Lissy2019.do, while 0b_Lissy_currencies.do was used to get information on currencies. These do files are part of the project, but do not run with the run_everything.do.

Further details

  • The whole thing should take 20-40mins to run. It could certainly be written in a more efficient way, but it works, which is the most important. It was one of my first projects as a PhD student, so please be forgiving when judging.
  • The 02a do-file requires the genstack command in stata to be installed. If you havent done it, please type the STATA command:
ssc install genstack 

About

Reproducible Code for "The capital share and income inequality: Increasing gaps between micro and macro data"

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages