Chih-Sheng Hsieh and Lung-Fei Lee, "A Social Interactions Model with Endogenous Friendship Formation and Selectivity", Journal of Applied Econometrics, Vol. 31, No. 2, 2016, pp. 301-319. The data used in the article are from the National Longitudinal Study of Adolescent to Adult Health (Add Health). This is a confidential data source administered by Add Health Carolina Population Center University of North Carolina at Chapel Hill CB# 8120, University Square 206 West Franklin Street Chapel Hill, NC 27516 Researchers should submit a research proposal to the above address to get permission to use this data. The empirical study in our paper is based on the WAVE I in-school survey data. The file "data_arrange" provides the STATA code to arrange the data. The codes for estimation are written in Fortran, and readers should complie "SCSAR.f90", "random.f90", and "tool.f90" together to get the executable file. These four files are zipped in the file hl-empirical.zip. The codes of simulation in our paper are separated by data generating process and estimation. They are also written in Fortran. The files for both DGP and estimation are zipped in the file hl-simulation.zip. Please address any questions to: Chih-Sheng Hsieh Dept. of Economics The Chinese University of Hong Kong Esther Lee Bulding 9th floor Shatin Hong Kong