Data and code for the manuscript "Increased risk of death immediately after discharge from compulsory care for substance abuse" appearing soon on medRxiv
The data provided has been slightly aggregated to preclude identification. Age at discharge is here only given in age groups.
Each figure and table contains it's own R-script and each script loads required libraries. For example, to generate Figure 2, just run the code in figure2.R