This archive contains Stata codes to replicate the results presented in publication 31-45. For any further problems or questions, please contact Yue Qian (qian.85@buckeyemail.osu.edu). The Gender Divide in Urban China: Singlehood and Assortative Mating by Age and Education Yue Qian and Zhenchao Qian Department of Sociology The Ohio State University Four waves of Chinese General Social Survey (CGSS) data are available online through a public data archive—Chinese Social Survey Open Database (www.cssod.org). However, you must register before you can get access to these data. Therefore, original CGSS data are not shared in this archive. Replication materials: All codes were written in Stata. Figures and Tables were created in Microsoft Excel. Do file "1.DataClean_ReplicateForDemRes.do" was used to clean CGSS data. Stata output was stored in the log file "1.DataClean_ReplicateForDemRes.log". Do file "2.Desp_ReplicateForDemRes.do" was used to conduct descriptive analysis and produce Figures 1, 2 and 3 as well as Table 2. Stata output was stored in the log file "2.Desp_ReplicateForDemRes.log". Do file "3.LogLinear_ReplicateForDemRes.do" was used to conduct log-linear analysis. Stata output was stored in the log file "3.LogLinear_ReplicateForDemRes.log". Do file "4.SensAnalysis_ReplicateForDemRes" was used to conduct sensitivity analysis. Stata output was stored in the log file "4.SensAnalysis_ReplicateForDemRes.log". Microsoft Excel file "FigTableforDemRes.xlsx": Spreadsheet "Fig.1-3" contained calculations for marriage rates and produced Figures 1 through 3. Spreadsheet "Table 2" produced Table 2. Spreadsheet "Count" contained the 4-way contingency table for log-linear analysis. Spreadsheet "Table 3" produced fit statistics for log-linear models, including BIC and the LRT statistics. Spreadsheet "Table 4" produced Table 4.