This README file describes the data and Stata code files used to conduct the analyses for the paper: Babiarz KS, Ma P, Miller G, and Song S. (2019) Population sex imbalance in China before the One Child Policy. The analysis can be replicated using the do file Analysis_DR.do, which takes input data from 2 sources. 1. 1988 National Sample Survey of Fertility and Contraception conducted by the National Family Planning Commission (NFPC), now the National Health and Family Planning Commission (NHFPC), of China. All questions regarding the access and sharing of this data should be directed to NHFPC. 2. Data file Chen1984TFR.csv contains total fertility rates estimated in Chen (1984) and may be obtained from: Chen Shengli, 1984. Fertility of Women During the 42-Year Period from 1940 to 1981. In China Population Information Center, Analysis on China's National One-per-Thousand-Population Fertility Sampling Survey, Beijing 56-57. Analysis of underreporting can be replicated using the do file Underreporting_DR.do, which takes input data from 4 sources. 1. 1988 National Sample Survey of Fertility and Contraception conducted by the National Family Planning Commission (NFPC), now the National Health and Family Planning Commission (NHFPC), of China. All questions regarding the access and sharing of this data should be directed to NHFPC. 2. Micro data from China’s 1990 census, 1991_census.dta, which may be downloaded from https://international.ipums.org 3. County-level age-specific population counts from China’s 1990 census, data file CHINA05.DTA, which may be obtained by contacting the University of Michigan China Data Center (http://www.chinadatacenter.org), or the National Bureau of Statistics of China. 4. National-level age-specific population counts from China’s 1990, 1982, 1964, and 1953 censuses, agestructure.csv, which may may be obtained from the National Bureau of Statistics of China.