Sovereign 8s.is mirror of standardgalactic/Heat_AC_Use_Mortality_US
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
CHENlab-Yale 7a6cee52ee
Update README with R version and execution time
Added information about R version and execution time for analyses.
2026-03-10 08:33:34 -04:00
Code Refactor and clean up Prediction.R script 2026-03-10 08:32:49 -04:00
Data Add files via upload 2026-02-24 11:52:49 -05:00
Results Add files via upload 2026-02-24 11:52:49 -05:00
README.md Update README with R version and execution time 2026-03-10 08:33:34 -04:00

Heat_AC_Use_Mortality_US

These sample codes and data are attached to the paper titled "Averted Heat-Related Mortality in the United States from Air Conditioning Usage" by Chu et al. In this paper, we designed a time-stratified case-crossover study combined with two-stage models to evaluate the role of household air conditioning (AC) usage in the temperature-mortality associations.

We conducted the analyses in R-4.4.2. All files are expected to run within 1 minute on the sample data, respectively.

####### Sample data We are not allowed to disclose the real health data. We used the chicagoNMMAPS dataset from the "dlnm" package as sample data.

####### "Codes" folder 1.Clean_Chicago_data.R: (1) To mimic our real data, the Chicago data was re-organized into individual-level data. (2) We picked controls for the cases under a time-stratified case-crossover design. (3) Lagged exposures were linked to each case and control. (4) To illustrate the idea of two-stage models, individuals in the Chicago data were randomly assigned to seven counties.

2.First_stage_model.R: We modelled county-specific temperature-mortality associations incorporating distributed lag non-linear models and conditional logistic regression.

3.Second_stage_meta_regression.R: We pooled county-specific associations with meta regression on county-level household AC usage and socio-demographic and climate covariates. For simplicity, the covariates were omitted in the sample code.

4.Prediction.R: We predicted the temperature-mortality curve at the AC usage levels of interest.

"Data" folder:
  • Data.0-4.rds files were step-by-step cleaned Chicago data, generated by 1.Clean_Chicago_data.R
  • Data.Z.Fake_AC.rds included fake county-level average household AC usage data (generated in 3.Second_stage_meta_regression.R).
"Results" folder:
  • This folder included intermediate results (i.e., county-specific modeling estimates and meta regression outputs), generated by 2.First_stage_model.R and 3.Second_stage_meta_regression.R.
  • An example of the temperature-mortality curve when AC usage=1300 kWh was provided in this folder, named "Figure.Temp_mortality_curve_ac1300.tiff."