Skip to main content
Dryad

R codebase from: Medicare and Medicaid hospital quality ratings and hospital community commitment – A cross-sectional study

Data files

Jun 08, 2026 version files 41.40 KB

Click names to download individual files

Abstract

This codebase contains an R Markdown script for reproducing the findings of Medicare and Medicaid Hospital Quality Ratings and Hospital Community Commitment – A Cross-Sectional Study (https://doi.org/10.1016/j.jcjq.2026.05.001). The included script links publicly available hospital data from the Centers for Medicare & Medicaid Services (CMS) Overall Hospital Quality Star Ratings and the Lown Institute Hospital Index to assess associations between hospital quality ratings and measures of service to and support for vulnerable communities. The data structure, which relies on data obtained and curated by independent entities, is hospital-level in nature. Variables included in the analysis represent CMS star ratings, Lown Institute inclusivity and community benefit rankings and grades, hospital characteristics, and sensitivity analysis variables included hospital referral region codes and reconstructed CMS continuous summary scores. This data is solely the property of the collecting entities, this script is solely for the purpose of analysis of publicly available data. The code reproduces the study's findings and workflow, including data cleaning, data linkage, cohort construction, descriptive comparisons of hospitals, figure generation, Kendall's tau-b and partial tau-b correlation analyses, and sensitivity analyses. These materials may be used to reproduce the published findings, examine alternative queries, and further evaluate the relationship between hospital quality ratings and measures of community commitment. These materials may also be used for educational purposes and methodological work. All data used in the project was obtained from publicly available, hospital-level datasets cited in the associated manuscript. The dataset does not contain personally identifiable information or protected health information. As the source materials rely on publicly available hospital-level data, no additional ethical restrictions apply beyond appropriate citation of the original datasets and/or publications.