This project offers a collection of R scripts designed to estimate the effect size of deaths within social proximity. These scripts utilize various statistical models, including linear regression, spatial error model, and two-way fixed effects, to conduct the analysis. Additionally, the scripts include guidance on how to extract data from data.census.gov using the "tidycensus" package. The project also encompasses detailed instructions on generating plots from the statistical models and exploratory analysis.
- RStudio 2022.12.0+353 "Elsbeth Geranium"
The primary variables of interest, deaths in social proximity and deaths in spatial proximity, are defined as follows:
The variables s_{-i} and d_{-i} are defined as:
where the social and spatial proximity weights are given by:
In the linear model
The diagram shows the data pipeline for OOD, along with the streams for the primary variable of interests
- Exploratory maps are generated from the R scrpit "pa_ood_2018_2019_figures"
- The confidence interval plots and scatter plot matrix are generated from the r-script "coefficient_plot_for_models". The script also entails the regression tables.
Mortality data was obtained from the National Center for Health Statistics (NCHS). Due to confidentiality concerns, this data set is not publicly accessible, but can be requested from NCHS at https://www.cdc.gov/nchs/nvss/nvss-restricted-data.htm. The clinical covariates were sourced from the IQVIA Xponent database, which is also not publicly available. Access can be requested through IQVIA at https://www.iqvia.com/insights/the-iqvia-institute/available-iqvia-data. Data on illicit fentanyl-related drugs were obtained from the National Forensic Laboratory Information System (NFLIS) and can be accessed at https://www.nflis.deadiversion.usdoj.gov. Data on frequent mental health distress is obtained from the County Health Rankings and Roadmaps (CHRR) at https://www.countyhealthrankings.org/sites/default/files/media/document/analytic_data2019. The 2016 General Election data can be accessed at https://raw.githubusercontent.com/tonmcg/US_County_Level_Election_Results_08-20/master/2016_US_County_Level_Presidential_Results. The social determinants of health (SDOH) covariates are available from the Agency for Healthcare Research and Quality (AHRQ) at https://www.ahrq.gov/sdoh/data-analytics/sdoh-data.html. The Social Connectedness Index data can be accessed through the Facebook Data for Good tools at https://dataforgood.facebook.com/dfg/tools/social-connectedness-index. Data on drug overdose deaths used in our LASSO covariate selection are available from the Bureau of Health Statistics and Registries of the Department of Health of the Commonwealth of Pennsylvania and can be requested as follows: https://www.health.pa.gov/topics/Documents/Reporting-Registries/VR-Govt-Researchers/Application.%20for%20Access%20to%20Protected%20Data%20for%20Public%20Health%20Researchers%20-%20User%27s%20Guide.pdf.
