Sovereign 8s.is mirror of standardgalactic/PatternsAdverseLifeEvents
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-12-13 10:45:01 +01:00
code Compute age statistics and change sex to gender 2025-12-13 10:26:08 +01:00
figs Compute age statistics and change sex to gender 2025-12-13 10:26:08 +01:00
renv Add renv for reproducibility 2025-11-09 14:55:10 +01:00
.gitignore Remove grid lines in accumulation life events figure 2025-11-11 15:22:05 +01:00
.Rprofile Add renv for reproducibility 2025-11-09 14:55:10 +01:00
LICENSE Initial commit 2025-05-17 13:11:40 +02:00
PatternsAdverseLifeEvents.Rproj Initial commit 2025-05-17 13:18:36 +02:00
README.md Add DOI badge to README 2025-12-13 10:45:01 +01:00
renv.lock Add renv for reproducibility 2025-11-09 14:55:10 +01:00

DOI

This repository contains the analysis scripts for the paper: ``Non-random patterns in the co-occurrence and accumulation of adverse life events in two national panel datasets" by Kyra Evers, Denny Borsboom, Eiko Fried, Fred Hasselman, František Bartoš, and Lourens Waldorp. The preprint is available here.

The code is organized in the following way:

  • main.R runs all analyses on the SHP and HILDA data, using the following scripts:
    • setup.R loads the necessary libraries, sets up the parameters, and defines some helper functions
    • prepare_data_func.R defines functions to prepare the data from SHP and HILDA for analysis
    • cooccurrence_event_types.R runs the co-occurrence of adverse life event types analysis
    • lagged_event_counts.R runs the lagged event counts analysis
    • accumulation_event_counts.R runs the accumulation of event counts analysis
  • descriptives.R calculates and plots descriptive statistics for both datasets

The resulting figures can be found in the figs folder.

The SHP data is available at https://www.swissubase.ch/en/catalogue/studies/6097/20179/overview, with instructions for download at https://forscenter.ch/projects/swiss-household-panel/data. Access to the HILDA dataset can be requested at https://dataverse.ada.edu.au/dataverse/DSSLongitudinalStudies.

For any questions, please contact Kyra Evers at kyra.c.evers@gmail.com.