The supplemental StataCode.zip archive for this publication contains the following files. Stata files were created using Version 14 and may not be compatible with earlier versions. The SEDD_4_0 dataset is publicly available for download at: http://www.ed.lu.se/databases/sedd/sedd-public-access 1. Stata program to transform the SEDD dataset into an episodes file that can be used for survival analysis 1_Create_dataset.do 2. Stata program to prepare the data for survival analysis (creation of variables etc.) 2_Prepare_data_survival_analysis.do 3. Stata program to create the descriptive statistics (Table 2-3 and Figure 4 in the paper) 3_Descriptives.do 4. Stata program to estimate the models (Table 4-6) 4_Models.do