Investigating spousal bereavement with a Dual Approach: Causal Inference and Predictive Modelling Methods.
This project is my master thesis in Public Health Science from the Univerisity of Copenhagen.
Background and aim of the thesis: Losing a spouse is a challenging life event linked to adverse health outcomes, such as mental illness and mortality. This study delves into the association between spousal bereavement and cause-specific mortality among older married adults. The objective is to analyze the average effect of this loss on cause-specific death (aim I) and investigate individual reactions using prognostic prediction models to predict cause-specific death (aim II). The research employed nationwide registry data on Danish citizens aged ≥65 years, focusing on married older adults who either experienced spousal bereavement in 2012 or did not (matched 1:20). Elderly individuals were tracked from the time of spousal loss or the corresponding date for those who did not lose their spouse (index date) until death, emigration, or the end of a 3-year follow-up period. Cause-specific death categories included cancer, cardiovascular diseases, dementia and Parkinson's, diabetes, digestive diseases, psychiatric diseases or suicide, and respiratory diseases. A counterfactual approach with G-computation estimated the average effect of spousal bereavement on the risk of cause-specific death (aim I). Additionally, prognostic prediction models, incorporating various predictors, including healthcare expenditures, were developed to predict the risk of death from specific causes (aim II).
The code for the project is diveded into three files avaliable here on github or quarto-pub:
- Data preprocessing: merging data and tidying the data for analysis
- Analysis of aim I: the average bereavement effect on cause-specific mortality
- Analysis of aim II: predicting cause-specific mortality
Access the quarto-pub link for all the information and the structure of the code in chunks:
- Preprocessing: https://mathildembsloth.quarto.pub/data-preprocessing/
- Average bereavement effect: https://mathildembsloth.quarto.pub/average-bereavement-effect/
- Prediction: https://mathildembsloth.quarto.pub/predicting-cause-specific-mortality-in-older-danish-adults/
Data availability: The data for the analysis is individual level data from Statistics Denmark. The data can only be shared under specific conditions. According to Danish law, scientific organizations can be authorized to work with data within Statistics Denmark and can provide access to individual scientists inside and outside of Denmark. Data are available via the Research Service Department at Statistics Denmark: www.dst.dk/da/TilSalg/Forskningsservice for researchers who meet the criteria for access to confidential data.