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 2023, published in the Journals of Gerontology: https://doi.org/10.1093/geronb/gbad062

DescriptionCode
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

Exercise to socialize? Bidirectional relationships between physical activity and loneliness in middle-aged and older American adults

Code for all analysis in the article by Surkalim et al 2024, published in the American Journal of Epidemiology: https://doi.org/10.1093/aje/kwae001

DescriptionCode
S0 - Data Cleaning in StataData cleaning
S1 - Imputation in RImputation
S2 - Post-processing of imputed data in RPost-processing
S3 - RI-CLPM models using lavaan in RRI-CLPM
S4 - Pooled results from imputation using Rubin’s rulesPooled results
S5 - Mixed effects models for comparison purposesGLMMS
S6 - Socio-demographics tableDemographics
  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.
Avatar
Dr. Philip J Clare, PhD

Biostatistician at the Prevention Research Collaboration, University of Sydney.

Related