Harmonized CHARLS Creation Code

The Harmonized CHARLS dataset can be downloaded directly from the CHARLS website: Download Harmonized CHARLS Data

The Harmonized CHARLS version D dataset is created using data from Wave 1, 2, 3, and 4 of CHARLS and the CHARLS Life History Survey. 

Download the Harmonized CHARLS Stata Creation Code.

To run the Harmonized CHARLS Creation Code in Stata:

  • Store all CHARLS data files for Wave 1, 2, 3, and 4 and CHARLS Life History Survey on your computer. 
  • Register on the CHARLS DataForum. After logging in, view this birth date discussion.  From the  Feb 01, 2016 post by econwang download the lunar2solar.zip attachment. Unzip this attachment and store the solar to lunar Mata file named lunar2solar.mmat on your computer.
  • Edit lines 13-17 of the Stata Creation Code to list the folder location of the CHARLS Wave 1, Wave 2, Life History Survey,  Wave 3, and Wave 4 data. Edit line 18 to list the folder location of the solar to lunar Mata file. Edit line 19 to list the folder location where you would like to save the Harmonized CHARLS dataset. 

If you would prefer to work with the Harmonized CHARLS dataset in a statistical package other than Stata, you can convert the Harmonized CHARLS Stata dataset using a program such as Stat/Transfer. If you do not have access to Stat/Transfer, you may be able to read the .dta dataset into your stat package using an “import” or “get” function. When reading a .dta dataset into another package, it is best to first save the dataset in a Stata version 12 format using the command saveold.