This archive contains Stata codes to replicate the results in the following paper published in Demographic Research. Educational and Age Assortative Mating in China: The Importance of Marriage Order Yang Hu, Yue Qian Both authors contributed equally to the work and their names are listed alphabetically. For any further question, please contact Yue Qian (yue.qian@ubc.ca) or Yang Hu (yang.hu@lancaster.ac.uk). The archive contains the following files. Stata files were created using Version 14.0. “Links to the data provider.txt”: This txt file provides information regarding conditions for access and links to the data provider. “Description of variables used.csv”: This CSV document provides meta-description of the variables used in the analysis. Log file “1.DemRes CGSS Cleaning 26APR2019.txt” presents syntax and output for cleaning CGSS data. Log file “2.DemRes CFPS Cleaning 26APR2019.txt” presents syntax and output for cleaning CFPS data. Log file “3.DemRes CFPS_CGSS 26APR2019.txt” presents syntax and output for combining CFPS and CGSS data and for creating analytical sample used in this study. Log file “4.DemRes Analysis 26APR2019.txt” presents syntax and output for the main analysis reported in this study. Log file “5.DemRes Sensitivity Analysis 26APR2019.txt” presents syntax and output for the sensitivity analysis reported in this study.