This repository contains two Stata do-files: 00_master and 01_Clean. By following the instructions below, you will generate a cleaned, appended dataset that can be used for panel data analysis.
Create a folder where all your data will be stored. This will be your "master" folder, containing subfolders for different stages of the data conversion process. For example, you can name it Data.
-
Inside the master folder, create the following subfolders:
01_Raw_data02_Clean03_Codes(optional, for storing Stata scripts)
-
Inside the
01_Raw_datafolder, create a subfolder calledincome_india_memto store all the CSV files for the income pyramids. You can download these files from the CMIE Income Pyramids. -
Inside the
02_Cleanfolder, create a subfolder calledincome_india_mem_dtato store the cleaned.dtafiles.
In the 00_master do-file, change the directory path to match your working directory:
cap global dir "/Volumes/bishmayexp/Data"Once done, run the 00_master do-file. This will capture the necessary global macros.
- Next, run the 01_Clean do-file. This script will:
- Convert the CSV files to Stata .dta format.
- Save the .dta files in the income_india_mem_dta folder.
- Append the files and add the required variables to create a panel dataset.
After running this, the final output will be a .dta file named member_income_clean.dta, located in the income_india_mem_dta folder, along with other processed files.