Data supporting the article: Health system influences on potentially avoidable hospital admissions by secondary mental health service use: A national ecological study
These materials relate to the following publication:
Woodhead, C., Martin, P., Osborn, D., Barratt, H., & Raine, R. (2021). Health system influences on potentially avoidable hospital admissions by secondary mental health service use: A national ecological study. Journal of Health Services Research & Policy. https://journals.sagepub.com/doi/full/10.1177/13558196211036739
The materials are designed to enable independent researchers to reproduce the analyses presented in the section “Predictors of variation in CCG-level PAAs”. We are not permitted to share HES data and thus have not included data or code to reproduce the calculation of Potentially Avoidable Admission (PAA) rates. Only the prediction of PAA rates by CCG characteristics is covered in the code presented.
· The main data set to be read into R is: “MH_Avoidable.csv”
· Explanation of variables in: “Avoidable Admissions - List of variables.xlsx”
· Lists of CCG identifiers that completeness thresholds for diagnostic information in the MHSDS data set (for sensitivity analyses) are:
o “CCGs with fewer than 50pct missing.csv”
o “CCGs with fewer than 70pct missing.csv”
To run R code, first open the R Studio project “Potentially avoidable admissions - data and code.Rproj”.
· Code for implementing MIRL to investigate predictors of PAA rates:
o in secondary mental health service users: “MIRL stages 2,3,4 - MHSDS patients - physical admissions.R”
o in the comparator group: “MIRL stages 2,3,4 - No MHSDS - physical admissions.R”
· code for sensitivity analyses:
o “Sensitivity analysis.R”
o “Sensitivity analysis 70pct missing.R”
· code for fractional polynomials: “MH avoidable – fractional polynomials.R”
All other R code files contained within the project are called from within these five files via the source command.