Health and Retirement Study (HRS) Cohort Analysis
R and Stata Analysis Code
This repository contains R and Stata code used in a number of articles using the Health and Retirement Study (HRS) Cohort Analysis (1).
When loneliness becomes a problem: Point prevalence and sustained loneliness comparisons in older American adults of the Health and Retirement Study
Code for all analysis in the article by Surkalim et al 2022
Description | Code |
---|---|
S1 - Data Cleaning in Stata | Data cleaning |
S2 - Imputation in R | Imputation |
S3 - Post-processing of imputed data in R | Post-processing |
S4 - Data finalise and import into Stata | Data finalise |
S5 - Sample characteristics | Sample characteristics |
S6 - Raw trends | Raw trends |
S7 - Trend analysis - sustained | Trend models - sustained |
S8 - Trend analysis - point | Trend models - point |
S9 - Trend analysis - scale indicator | Trend models - scale |
S10 - Multivariable analysis | Multivariable analysis |
- Sonnega A, Faul JD, Ofstedal MB, Langa KM, Phillips JWR, Weir DR. Cohort Profile: the Health and Retirement Study (HRS). International Journal of Epidemiology. 2014;43(2):576-85.