**Characterizing the role of unpredictability within different dimensions of early life adversity**
**Data, code and materials**
This project made use of the Pathways to Desistance Study. To access the raw data file, that is necessary to start the pipeline, visit the study website (https://www.pathwaysstudy.pitt.edu/index.html) and follow the appropriate steps.
**Data**
We provide the pre-processed data file (Data/PathwaysMaster.csv), that is sufficient to reproduce fully, all analyses reported in the manuscript.
**Code**
All code is in R. A brief description of each script is provided below, in the recommended order of execution.
1. Pathways_preprocess.R retrieves the relevant variables from the raw dataset, and performs some pre-processing, such as recoding scores and missing values.
2. Pathways_regs.R fits the random effects models on the indicators and creates the adversity composites used in the main analysis.
3. Pathways_missingness.R calculates missing data fractions, and performs the missing data analysis, to identify the missing data mechanisms.
4. Pathways_desc.R summarises demographic information.
5. Pathways_models.R carries out the main analysis, and fits the mediation models.
**Supplementary**
Rdata file containing the data and model outputs for all models.