Analysis of the Household Income and Labour Dynamics Australia (HILDA) survey
This repository contains R and Stata code used in articles using the HILDA cohort.
Trends in loneliness in Australia
Code for all analysis in the article examining trends in loneliness and social isolation in Australia (Ding et al 2025).
| Description | R Code |
|---|---|
| 1 - Data extraction - pull relevant variables from HILDA data and combine into single dataset. | Data extraction |
| 2 - Create summary of missing data. | Missing data |
| 3 - Test linearity of trends. | Linearity |
| 4 - Calculate observed, unadjusted prevalence. | Raw trends |
| 5 - Model trends in prevalence over time. | Modeled trends |
| 6 - Create overall plots of prevalence. | Create plots |
| 7 - Create plots stratified by levels of sociodemographic variables. | Demographic plots |
| 8 - Calculate p-values of interaction terms. | Interaction p-values |
| 9 - Test linearity, allowing for trend to change due to COVID. | COVID linearity |
| 10 - Model trends, allowing for trend to change due to COVID. | COVID models |
| 11 - Create plots for trends, allowing for trend to change due to COVID. | COVID plots |