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

S1 - Data Cleaning in StataData cleaning
S2 - Imputation in RImputation
S3 - Post-processing of imputed data in RPost-processing
S4 - Data finalise and import into StataData finalise
S5 - Sample characteristicsSample characteristics
S6 - Raw trendsRaw trends
S7 - Trend analysis - sustainedTrend models - sustained
S8 - Trend analysis - pointTrend models - point
S9 - Trend analysis - scale indicatorTrend models - scale
S10 - Multivariable analysisMultivariable analysis
  1. 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.
Dr. Philip J Clare, PhD

Biostatistician at the Prevention Research Collaboration, University of Sydney.