Abstract
Epidemiological approaches for examining human health responses to environmental exposures in observational studies often control for confounding by implementing clever matching schemes and using statistical methods based on conditional likelihood. Nonparametric regression models have surged in popularity in recent years as a tool for estimating individual-level heterogeneous effects, which provide a more detailed picture of the exposure-response relationship but can also be aggregated to obtain improved marginal estimates at the population level. In this work we incorporate Bayesian additive regression trees (BART) into the conditional logistic regression model to identify heterogeneous exposure effects in a case-crossover design. Conditional logistic BART (CL-BART) utilizes reversible jump Markov chain Monte Carlo to bypass the conditional conjugacy requirement of the original BART algorithm. Our work is motivated by the growing interest in identifying subpopulations more vulnerable to environmental exposures. We apply CL-BART to a study of the impact of heat waves on people with Alzheimer’s disease in California and effect modification by other chronic conditions. Through this application, we also describe strategies to examine heterogeneous odds ratios through variable importance, partial dependence, and lower-dimensional summaries.
Keywords: Bayesian additive regression trees, Environmental epidemiology, Alzheimer’s disease
1. Introduction
In the United States, Alzheimer’s disease (AD) affects 6.7 million people aged 65 and older in 2023, with that number projected to more than double by 2060. AD is the most common cause of dementia, entirely or partially responsible for 60-80% of all cases. People with AD often struggle to communicate and complete tasks in their daily life due to a host of symptoms headlined by forgetfulness, lethargy, and confusion. An estimated 1.3% of emergency department (ED) visits involve people with AD and related dementia, and within this population the number of ED visits per 1,000 Medicare beneficiaries increased 28% from 2008 to 2018 - outpacing cancer, stroke, and heart failure (Alzheimer’s Association, 2023).
In recent years, extreme heat has been associated with elevated risk of ED visit, hospitalization, and death among people with AD and dementia in Spain, Australia, Germany, and the United States (Culqui et al., 2017; Xu et al., 2019; Fritze, 2020; Wei et al., 2019; Zhang et al., 2023). Fritze (2020) reported that the number of comorbid conditions is associated with increased risk of mortality among people with dementia.
There are several potential explanations for why people with AD are more affected by extreme heat. People with AD may have elevated core body temperature due to disturbed circadian rhythms responsible for thermoregulation (Volicer et al., 2001; Satlin et al., 1995; Harper et al., 2005; Klegeris et al., 2007). Alternatively, people with AD tend to wander or get lost, resulting in prolonged exposure to extreme temperatures (Alzheimer’s Association, 2023). Another possibility is that these individuals may struggle to communicate their heat-related discomfort in certain situations with their caregivers (Van Hoof et al., 2010).
These explanations may not apply to the entire AD population. People with AD and related dementia are 2.7 times more likely to have 4 or more additional chronic conditions compared to people without AD or dementia; in the United States, 56% have hypertension, 46% have chronic kidney disease (CKD), 37% have diabetes, 34% have congestive heart failure (CHF), and 20% have chronic obstructive pulmonary disease (COPD) (Alzheimer’s Association, 2023). Additionally, an estimated 12.7% of people with AD have depression (Chi et al., 2015). Given the variety of concomitant diagnoses these individuals tend to have, it is possible that heterogeneity exists in the exposure-response relationship describing heat wave-related morbidity. Thus, studying modifiers of this relationship is of interest.
Some of the aforementioned studies model heterogeneous exposure effects via stratification or by interacting covariates with the exposure (Fritze, 2020; Zhang et al., 2023), while others directly target these effects using the case-only approach of Armstrong (2003) (Xu et al., 2019). In the extreme temperature literature, stratification has been mostly applied for demographic characteristics (e.g., age, race, and sex), while the case-only approach has also been used for chronic conditions, socioeconomic status, and various census tract characteristics (Schwartz, 2005; Zanobetti et al., 2013; Xu et al., 2017; Madrigano et al., 2015). These approaches to heterogeneous effects estimation are limited by the need for expert knowledge regarding which factors are important before model-fitting, and they are not readily capable of identifying complex interactions among potential effect moderators.
We propose an extension of the popular case-crossover study design to estimate heterogeneous exposure effects using Bayesian additive regression trees (BART) (Chipman et al., 2010). As it is typically applied, this design is limited to the previously mentioned strategies for heterogeneous effects estimation. The proposed method, CL-BART, uses BART within the case-crossover design to flexibly learn potentially complicated heterogeneous exposure-response relationships during the model-fitting process, with minimal prespecification required. In Section 2 we introduce the data for the motivating application. In Section 3 we review the case-crossover design, conditional logistic regression, and BART. We then develop CL-BART, focusing on the reversible jump portion of the estimation algorithm. In Section 4 we describe strategies for drawing posterior inference from the proposed model. In Section 5, we conduct two simulations illustrating the performance of CL-BART, and in Section 6 we apply CL-BART to estimate the effects of heat waves on ED visits among people with AD in California. Finally, in Section 7 we summarize our findings, discuss the limitations of the approach, and suggest possibilities for future improvements.
2. Data
2.1. Health Data
The data for our motivating application includes all ED visits among people with AD in California occurring from 2005 to 2015. These data were obtained from the California Office of Statewide Health Planning and Development, and include patients’ visit date, sex, age, race, ethnicity, residential ZIP code, and diagnosis codes based on the International Classification of Diseases. We restrict the ED visit records to include only those who had either a primary or secondary diagnosis of AD. Diagnoses of comorbid conditions were also based on the presence of any diagnosis code for CHF, CKD, COPD, depression, diabetes, hypertension, and hyperlipidemia (see the Supplementary Materials for a list of codes).
2.2. Exposure Data
Meteorology data were obtained from Daymet (Thornton et al., 2022). The 1 km data product was spatially averaged within each ZIP code, and linked to the ED visit data by both date and ZIP code. Specifically, we use the daily average temperature (° C) and dew-point temperature (° C). The former is calculated as the arithmetic mean of the daily minimum and maximum temperature, and the latter is derived from water vapor pressure using the Magnus formula presented in Sonntag (1990). The exposure of interest, heat wave, is defined as any sequence of two or more days at or above the ZIP code-specific 95th percentile of daily average temperature (excluding the first day of such a sequence to better reflect sustained heat exposure). Daily average temperature, dew-point temperature, and a US federal holiday indicator were also treated as potential confounders in the health model.
3. Methods
3.1. Model Specification
3.1.1. Case-Crossover Design and Conditional Logistic Regression
Case-crossover designs are frequently used to analyze the effects of short-term exposure on health outcomes in environmental epidemiology studies (Carracedo-Martínez et al., 2010), when only cases are available. This design allows for estimation of associations between an outcome and time-varying exposures of interest while avoiding the need to adjust for confounding by time-invariant covariates that may be difficult or impossible to measure. In the case-crossover design, cases are matched to a set of controls within a “referent window” to create a stratum. A popular strategy for selecting this window is the time-stratified approach, which matches each case to the 3-4 other dates in a calendar month with the same day of the week. This strategy assumes the cases are independent and rare enough such that an individual would not experience the event twice within the referent window. The time-stratified design is both localizable and ignorable, thus providing unbiased estimation of regression coefficients when using conditional logistic regression (Janes et al., 2005).
Suppose cases are observed. Then the true data generating model is:
| (1) |
| (2) |
where is the outcome for individual at time is the probability of observing , and is the referent window containing observation times for individual . The primary exposure is denoted by , with being the associated log odds ratio. Time invariant and time-varying confounders of the exposure-response relationship are represented by the column vectors and , respectively, with associated log odds ratios denoted by the -vector and -vector . For the AD example, is a binary heat wave indicator, includes time-invariant demographic information or other unmeasured quantities, and includes daily average temperature, dew-point temperature, and a federal holiday indicator.
Operating under the case-crossover assumption that , the conditional likelihood for the observed data is given by (3)
| (3) |
where is the observed vector of outcomes within referent window , and is a vector containing all . Notably, is only implicitly present through the subscript , which represents the index time point of the case, and all time-invariant covariates have been conditioned out entirely due to perfect cancellation in the numerator and denominator for each individual. Maximum likelihood estimation of (3) results in unbiased log odds ratios (ORs) for the confounders ( ) and the primary exposure ( ).
This model assumes a homogeneous exposure effect across individuals. To examine how the association between the exposure and outcome varies across individuals, researchers may specify subgroup analyses ahead of time, defining the subgroups using demographic characteristics like sex and age. This requires some knowledge of the outcome and exposure to be able to identify which subgroups should be considered.
3.1.2. CL-BART and the Exposure Moderating Function
We propose extending this framework to allow for estimation of heterogeneous exposure effects within a study population. Specifically, we use BART (Chipman et al., 2010) to model the exposure effect as a function of individual-level covariates that were previously conditioned out. We start by defining a more general version of the conditional likelihood in (4), which we will refer to as the conditional logistic BART (CL-BART) likelihood.
| (4) |
Here we have simply replaced with , suggesting that the increase in the log odds of an ED visit due to a unit increase in may differ across individuals. The contents of may verlap with in (2), but the two need not be identical. In the AD example, includes comorbid conditions, such as diabetes and CKD, as well as sex and age.
We place a nonparametric BART prior on the exposure moderating function as in (5).
| (5) |
The BART prior represents as a sum of weak learners - in this case, Bayesian regression trees. Each tree is composed of a tree structure defined by a series of binary splits based on covariates , a set of terminal or “leaf” nodes , and a set of scalar leaf node parameters . In (5), is the function that makes a prediction for covariates by mapping to a single leaf node in the given tree.
In the simplest setting, consists only of a series of binary effect moderators and the maximum number of unique values of is , regardless of sample size. Including continuous covariates is a straightforward extension, and allows for modeling more complex high-order interactions and nonlinearities among exposure effect moderators. We do not consider time-varying covariates in , as this would result in individual strata being allocated to multiple leaf nodes, thus violating the case-crossover design.
3.2. Estimation
3.2.1. Generalized BART
BART was originally designed for Gaussian outcomes, relying on the conditional conjugacy between the outcome model and the prior distribution on the leaf node parameters. This allows for a Metropolis-Hastings (M-H) proposal for the tree structure to be conducted separately from the Gibbs update of the leaf node parameters through marginalization, resulting in a simple and efficient Markov chain Monte Carlo (MCMC) algorithm (Chipman et al., 2010). BART has since been extended to other outcomes types, including survival, log-linear, and gamma models (Sparapani et al., 2016; Murray, 2021; Linero et al., 2020), but such extensions require extensive modification of the original algorithm. BART has also been used to model varying coefficients (Deshpande et al., 2024; Hahn et al., 2020), but these leverage conditional conjugacy as well. Recently, Linero (2024) proposed a general strategy based on reversible-jump MCMC (RJMCMC) (Green, 1995) as a promising alternative for adapting BART to more complicated likelihoods. This approach is appealing because it avoids the need for conjugate priors altogether, and so we use it for CL-BART. We now provide a brief overview of this approach and our implementation, but refer the reader to the source for further detail.
3.2.2. Data Likelihood
It is first helpful to rewrite the data likelihood in terms of the tree structure. The likelihood for a single tree can be represented as in (6).
| (6) |
For CL-BART, we may substitute the likelihood given in (3), where represents the prediction from (i.e., the exposure effect) for strata having mapped to leaf node . Since is shared across all leaf nodes, we omit it in (6) to lighten the notation.
3.2.3. Prior Distribution
The unknown quantities for each tree in CL-BART include the leaf node parameters and the tree structure itself . By imposing independence on the former, we may factor the joint prior distribution for a single tree as in (7).
| (7) |
The are given i.i.d. priors, but this is not a requirement since conjugacy with the likelihood is no longer a concern. While one may have some idea of the range of values to expect for , generally this will be unknown. For this reason, we follow Linero (2024) and specify a half-Cauchy hyperprior to help learn the range of values for . Here, is a fixed hyperparameter, and the division by ensures predictions are made on the same general scale regardless of the number of trees used.
For the tree structure , we use the “branching process” prior described in Chipman et al. (2010), where each node in is split with probability (here is the depth of the node in ). We use the default values of , but note that in the heterogeneous effects setting there have been proponents for stronger regularization (Hahn et al., 2020). We make one departure from the traditional branching process by further placing a Dirichlet hyperprior on the covariate selection probabilities as suggested in Linero (2018). This modification helps particularly in settings with many covariates that each have many available values upon which to split.
3.2.4. Tree Proposals and the Posterior Distribution
New tree structures are proposed and accepted with a M-H step. We consider three types of proposals: grow, prune, and change. Both the grow and prune moves involve jumping between parameter spaces of differing dimensions, and thus require modification of the traditional M-H acceptance ratio. The general form for this ratio is given in (8):
| (8) |
The prior term may be factored as in Section 3.2.3, while the proposal term may be factored into two parts: a structural component and a proposal for the new leaf node parameter(s) based on some distribution . We use a normal distribution based on a Laplace approximation for , as suggested by Linero (2024) (see the Supplementary Materials for details). Each type of proposal is summarized below, where is defined as the set of nodes in that are parents of two terminal nodes.
- Grow: a random node is selected. Subsequently, a splitting covariate , and cut-point based on the values of are selected. Then is split into and , where strata having are fed into and strata having are fed into . For of depth , the modified RJMCMC M-H acceptance ratio is:
(9) - Prune: a random node is selected. Leaf nodes and are removed from the tree, along with the variable and cut-point that defined them. For of depth , the modified RJMCMC M-H acceptance ratio is:
(10) - Change: a random node is selected. The criteria for further splitting into leaf nodes and are exchanged for another variable and/or cut-point. Since the general tree structure is unchanged, the structural components of the prior and proposal ratios cancel out. The M-H acceptance ratio is:
(11)
At each iteration, one type of proposal is made for each tree in the ensemble. We set the prior probability of each proposal type to , and . The trees are cycled through using a generalized version of Bayesian backfitting (Hastie and Tibshirani, 2000; Linero, 2024). Essentially, this involves offsetting the likelihood calculation in the M-H acceptance ratio for the update of tree by the sum of the predictions from the remaining trees. Mathematically, we swap (6) with (12)
| (12) |
where . The M-H acceptance ratios presented in this section only depend on the likelihood within the affected leaf nodes, and so the inner product term of (12) can be used wherever the likelihood is evaluated in (9), (10), and (11).
Thus far for tree , the proposed values have been used solely to update . Once has been updated, we propose new values for all sequentially from their full conditional distribution via adaptive rejection sampling (Gilks and Wild, 1992).
Prior to the BART update, we update using a traditional random-walk M-H step. We use a multivariate normal proposal distribution which is centered at the current value of and has covariance matrix , where we initialize as the confounder portion of the covariance matrix of from the fit of a conventional conditional logistic regression as in (3), and is initially set to unity but tuned throughout the burn-in phase to achieve an optimal acceptance rate. Note that the proposal for is also offset by the confounders, in addition to the fits of other trees. An outline for the CL-BART MCMC algorithm is given in Algorithm 1.
4. Posterior Inference
As with any Bayesian model, point estimates and posterior credible intervals may be obtained for the confounder coefficients and other scalar parameters. To summarize the estimated heterogeneous exposure effects, we introduce estimands similar to those presented in the BART for causal inference literature (Hill, 2011; Hahn et al., 2020), with the two main differences being that we are working on the log odds ratio scale, and that we do not claim that our estimates have causal interpretations.
Initially, we estimate the average conditional exposure effect for a unit increase in the exposure as . This may also be exponentiated if an OR interpretation is desired. Perhaps of greater interest are the individual conditional exposure effects . These are numerous, so it is helpful to have strategies for summarizing them. We can easily obtain point estimates and posterior credible intervals of for any desired set of exposure modifiers . However, the individual-level quantities can be noisy, and so it can be beneficial to instead report partial averages of conditional exposure effects, such as the partial dependence functions introduced in Friedman (2001).
Define as the -vector of potential effect moderators, as the component of being evaluated (may be multiple components), and as all but the component of . The corresponding observations made on individual are , and , respectively. The partial average exposure effect is estimated as in (13).
| (13) |
One might select multiple settings of for comparison, where only a subset of need be included in , and calculate (13) for each setting. The resulting estimates (or any function of the estimates) can be compared across the posterior distribution. The simplest case is to fix a single binary covariate in , compute (13) for both levels of the covariate, and then calculate the difference in the partial averages. The corresponding estimate represents the marginal contribution of the selected covariate to the average exposure effect.
It may be difficult or computationally infeasible to perform an exhaustive comparison of all partial average exposure effects. To identify covariate values to fix during the partial averaging in (13), we suggest creating a lower-dimensional summary using, say, a single classification and regression tree (CART) as described by Woody et al. (2021). This involves using some subset of the input covariates to “predict” the posterior mean individual exposure effects. We can then compute (13) for the combinations of covariates leading to each leaf node in the resulting CART summary.
4.1. Model Diagnostics
It can be helpful to have a quick method for establishing variable importance. One option is to check the frequencies with which the BART model splits on each of the effect moderators (Chipman et al., 2010). In general, we expect the model to favor splits on covariates which are essential to the true data generating process. However, as the size of the ensemble increases, spurious splits will be included. The sparse branching process prior of (Linero, 2018) may help to alleviate this issue. Additionally, it is important to consider correlation between the covariates, and that there may be more than one path to a good model.
Since predictions are not available when using conditional logistic regression, cross-validation based on model selection criteria that involve the outcome (e.g., RMSE) do not apply. However, models can still be evaluated using likelihood-based criteria. We suggest using the Widely-Applicable Information Criteria (WAIC), which approximates leave-one-out cross-validation (Watanabe and Opper, 2010; Gelman et al., 2014). The WAIC uses the entire posterior distribution and all available data to evaluate and penalize models, and can conveniently be computed during model-fitting. This metric is useful for comparing CL-BART models with different hyperparameter specifications, such as the number of trees.
Lastly, it is essential to monitor the convergence of the Markov chain samples. Since the RJMCMC algorithm performs both model selection and parameter estimation, posterior chains of individual exposure effects may not have well-mixed trace plots due to the possibility of jumping between different parameter spaces. For this reason we suggest monitoring trace plots for global parameters, such as , and other quantities such as the log-likelihood or average number of nodes across trees. We did not find it was necessary to run multiple chains for the analyses described in the simulation study and application.
5. Simulation Study
In this section we design a simulation to mimic the case-crossover design. We follow 10,000 individuals for three years, and generate their shared exposure time-series as in (14).
| (14) |
Five time-varying confounders are generated as , with odds ratios 0.5, 0.8, 1.0, 1.2, and 2.0. The probability of individual experiencing the event at time is calculated as , where to ensure rare events, and the true for each individual is specified under two deterministic scenarios:
CART: 10 binary covariates are generated as , where has an AR-1 structure (i.e., ). Three of these 10 covariates are randomly selected ( and is given one of four values according to the tree diagram in Figure 1.
-
Friedman: 10 continuous covariates are generated as , and , where is the benchmark function proposed in Friedman (1991). We have scaled to approximately have a mean of zero and standard deviation of one-third, thus restricting the majority of potential odds ratios to be between 0.5 and 2.
(15)
Figure 1:

True Conditional Odds Ratios for CART Simulation
As individuals are followed throughout the study period, cases are noted and the time-stratified case-crossover design is implemented. In both scenarios, approximately 4500 cases are typically observed.
For Scenario 1, we compare 1, 5, 10, 25, and 50 tree ensembles. For Scenario 2, due to the presence of many continuous predictors, we explore larger ensembles of , and 100 trees. For both scenarios, we set and run 10,000 total MCMC iterations, with the first 5,000 serving as a burn-in period. We keep every fifth post-burn-in sample, resulting in 1,000 posterior samples. Other hyperparameter settings are explored in the Supplementary Materials.
To evaluate performance, we fit an “oracle” conditional logistic regression by creating a design matrix consisting of the true interactions and/or functional forms of the moderators, each interacting with the exposure. For each simulation we compute the average bias (16), root mean square error (RMSE) (17), and average 95% posterior credible interval coverage (18) of the individual exposure effects.
| (16) |
| (17) |
| (18) |
In (16), (17), and (18), is the posterior mean individual exposure effect. Results are summarized over 200 simulations for each setting and are presented in Tables 1 and 2.
Table 1:
CART Simulation Results - BART Predictions
| Type | M a | Biasb | RMSEb | Coverageb | Widthb |
|---|---|---|---|---|---|
| oracle | 0.002 (0.001) | 0.036 (0.001) | 0.940 (0.017) | 0.144 (0.000) | |
| clbart | 1 | 0.000 (0.001) | 0.067 (0.001) | 0.819 (0.027) | 0.187 (0.003) |
| clbart | 5 | 0.002 (0.001) | 0.056 (0.001) | 0.933 (0.018) | 0.211 (0.002) |
| clbart | 10 | 0.002 (0.001) | 0.058 (0.001) | 0.952 (0.015) | 0.235 (0.002) |
| clbart | 25 | 0.002 (0.001) | 0.063 (0.001) | 0.960 (0.014) | 0.266 (0.001) |
| clbart | 50 | 0.002 (0.001) | 0.069 (0.001) | 0.958 (0.014) | 0.286 (0.001) |
M: Number of trees.
Monte Carlo mean and standard errors across 200 simulations reported.
Table 2:
Friedman Simulation Results - BART Predictions
| Type | M a | Biasb | RMSEb | Coverageb | Widthb |
|---|---|---|---|---|---|
| oracle | −0.001 (0.001) | 0.040 (0.001) | 0.949 (0.016) | 0.160 (0.000) | |
| clbart | 5 | −0.001 (0.001) | 0.165 (0.001) | 0.801 (0.028) | 0.431 (0.002) |
| clbart | 10 | −0.001 (0.001) | 0.144 (0.001) | 0.914 (0.020) | 0.502 (0.002) |
| clbart | 25 | −0.001 (0.001) | 0.130 (0.001) | 0.967 (0.013) | 0.568 (0.002) |
| clbart | 50 | −0.001 (0.001) | 0.127 (0.001) | 0.978 (0.010) | 0.596 (0.003) |
| clbart | 100 | −0.001 (0.001) | 0.126 (0.001) | 0.980 (0.010) | 0.600 (0.003) |
M: Number of trees.
Monte Carlo mean and standard errors across 200 simulations reported.
5.1. CART Simulation
The oracle has low bias and has near 95% coverage, confirming the validity of the case-crossover design setup (Table 1). CL-BART also has negligible average bias, but generally has greater RMSE and wider intervals. The latter is to be expected since CL-BART estimates individual (not averaged) effects. RMSE is lowest for the 5 and 10 tree settings, and the average coverage generally increases as the number of trees increases. Bias and coverage of the confounders is on par with the oracle (see the Supplementary Materials).
The WAIC is lower for the 5, 10, and 25 tree settings for the default tree regularization priors, suggesting the potential for using WAIC to select hyperparameters (see the Supplementary Materials). In all simulations, the important covariates () are typically split with a greater frequency than the remaining seven covariates (Figure 2A). While these values are not perfect indicators of variable importance, this trend suggests the Dirichlet hyperprior is at least somewhat effective at selecting important covariates.
Figure 2: Simulation Variable Importance:

Plot of observed split proportions across 200 simulations (Monte Carlo mean and 95% uncertainty interval presented). Panel A corresponds to Scenario 1 (CART) and Panel B corresponds to Scenario 2 (Friedman).
5.2. Friedman Simulation
For the Friedman scenario, the oracle achieves low bias and near 95% average coverage. CL-BART is unbiased even in small ensembles (Table 2). As more trees are added, RMSE and average coverage improve, but interval widths increase. Once again, this is likely due to CL-BART making predictions on the individual level. Estimates of the confounders exhibit low bias and good coverage, and the WAIC for this scenario suggests that larger ensembles perform better, but the improvements diminish as the number of trees approaches 100 (see the Supplementary Materials).
We see that the important covariates () are all split on with greater frequencies, on average, than the remaining covariates (Figure 2B). The Dirichlet hyperprior is particularly effective in this setting since there are many available splitting points for all covariates. Also, CL-BART does well to capture the true marginal partial dependence for each covariate (see the Supplementary Materials).
6. Application
6.1. Descriptive Statistics
There were 633,639 ED visits with an AD diagnosis reported during the study period. Patient sex was not reported for 62 cases, race was not reported for 7,662 cases, and ethnicity was not reported for 8,930 cases. Further, only 72,413 cases contained a heat wave per our definition within their referent window (most occurring in the summer months), and thus are the only cases which may be used for estimating heat wave effects. Dropping these cases and implementing the time-stratified case-crossover design resulted in a total of 71,020 cases (319,336 observations).
The sample is primarily Non-Hispanic White (64.8%) and female (63.7%). The median age is 84 years (IQR: 79, 89). The median number of comorbid conditions is 2 (IQR: 1, 3), and hypertension is the most prevalent condition (65.2%) (Table 3). Over half of the sample has multiple conditions (56.1%), with the most common pairings being hypertension and hyperlipidemia (25.0%), hypertension and CKD (20.7%), hypertension and diabetes (19.6%), and hypertension and CHF (12.4%).
Table 3:
Descriptive Statistics for AD ED Patients, CA 2005-2015
| Characteristic | Overall |
|---|---|
| N a | 71,020 |
| Race/Ethnicity b | |
| Hispanic | 11,959 (16.8%) |
| Non-Hispanic White | 46,019 (64.8%) |
| Non-Hispanic Black | 5,635 (7.9%) |
| Non-Hispanic Asian and Pacific Islander | 5,521 (7.8%) |
| Non-Hispanic Other | 1,886 (2.7%) |
| Sex b | |
| Male | 25,762 (36.3%) |
| Female | 45,258 (63.7%) |
| Age, yrs c | 84 (79, 89) |
| Number of Comorbid Conditions c | 2 (1, 3) |
| Congestive Heart Failure (CHF) b | 11,494 (16.2%) |
| Chronic Kidney Disease (CKD) b | 17,937 (25.3%) |
| Chronic Obstructive Pulmonary Disease (COPD) b | 8,483 (11.9%) |
| Depression (DEP) b | 9,005 (12.7%) |
| Diabetes (DIAB) b | 17,654 (24.9%) |
| Hypertension (HT) b | 46,281 (65.2%) |
| Hyperlipidemia (HLD) b | 21,575 (30.4%) |
N;
N (%);
Median (IQR).
6.2. Model Considerations
Previous studies have found that associations between heat waves and health outcomes may differ by race and ethnicity (Madrigano et al., 2015; Knowlton et al., 2009), so in addition to the overall analysis, we also conduct a stratified analysis with the following mutually exclusive subgroups: Hispanic, Non-Hispanic White, Non-Hispanic Black, Non-Hispanic Asian and Pacific Islander, and Non-Hispanic “other”. The overall analysis includes these subgroups as potential effect moderators via one-hot encoding, while the stratified analysis is effectively forcing a split on race first. The overall analysis has the added benefit of having a larger sample size, but it may also mask heterogeneity within smaller subgroups, so we present both for comparison. In all analyses, we include sex and age alongside the comorbid conditions as potential moderators, with age being the only continuous moderator. The intuition behind including age is to allow it to serve as a proxy for other conditions that are not among those collected. The distribution of sex and age is comparable across subgroups, but the prevalence of the comorbid conditions varies (see the Supplementary Materials).
On the confounder side, both the daily average temperature and daily average dew-point temperature are modeled using natural cubic splines with four degrees of freedom. Federal holidays are included as a single indicator variable.
We fit a CL-BART model within each subgroup using the following hyperparameter settings: , and . The WAIC was generally similar across different settings, so we only present the results for these particular values. For the overall model, we use the same settings except with , which had the lowest WAIC. We ran all models for 10,000 iterations, setting aside the first 5,000 as burn-in and only keeping every fifth sample, resulting in a total of 1,000 posterior samples. When fitting the CL-BART model, we monitor trace plots for , and the average number of nodes to ensure adequate mixing and convergence in the final model fits. Examples of these plots are included in the Supplementary Materials.
6.3. Results
Both overall and within each subgroup, estimates of the average exposure effect are similar to what one would obtain had they ignored effect heterogeneity entirely and simply fit a conditional logistic regression model as specified in (3) (Table 4). The WAIC is similar or better for the CL-BART model in all subgroups (Table 4), suggesting that the overall fit of the models are improved by considering effect heterogeneity, but the additional complexity introduced by using BART may limit generalizability to new data. Density plots of the posterior mean individual exposure effects illustrate the varying degrees of heterogeneity captured by CL-BART in each subgroup (see the Supplementary Materials).
Table 4:
Homogeneous vs. Average Heterogeneous Estimate for Heat Wave Effect
| CLR | CL-BART | |||
|---|---|---|---|---|
| Subgroup | a (95% CrI) | WAIC | b (95% CrI) | WAIC |
| Overall | 1.02 (0.99, 1.05) | 216,788 | 1.01 (0.99, 1.05) | 212,623 |
| Hispanic | 0.98 (0.91, 1.06) | 36,170 | 0.99 (0.92, 1.05) | 35,724 |
| Non-Hispanic API | 0.99 (0.89, 1.09) | 16,512 | 0.99 (0.90, 1.08) | 16,513 |
| Non-Hispanic Black | 1.09 (0.97, 1.21) | 16,874 | 1.07 (0.96, 1.21) | 16,868 |
| Non-Hispanic Other | 0.90 (0.73, 1.08) | 5,658 | 0.92 (0.76, 1.09) | 5,657 |
| Non-Hispanic White | 1.03 (0.99, 1.07) | 137,904 | 1.01 (0.98, 1.05) | 137,894 |
API: Asian and Pacific Islander.
CLR: Conditional Logistic Regression. CrI: Posterior Credible Interval.
Estimated odds-ratio from CLR with no effect moderators.
Average exposure effect from CL-BART model.
To explore the heterogeneity estimated by CL-BART, we begin by visualizing the proportions of splits attributable to each moderator in Figure 3A. Unsurprisingly, age is split on with greater frequency than any of the binary moderators since it has more available splitting values. We also note that in some cases, certain binary covariates are split on more often than others. Notably, CKD is more prominent for Hispanics, and hypertension status is more prominent for Non-Hispanic Blacks. We have omitted the proportions for one-hot encoded race variables in the overall model, but together these accounted for of splits, pointing toward the importance of race/ethnicity in the analysis. Additionally, we present the marginal contributions (difference in the marginal ) for each binary covariate in Figure 3B. These estimates are ratios of ORs, and thus represent the multiplicative effect associated with the given moderator on the underlying OR estimate for the association between ED visits and heat waves. For example, the presence of CKD among Hispanics appears to be associated with a harmful modification of the exposure effect. Similarly, the presence of hypertension among Non-Hispanic Blacks is associated with a protective modification of the exposure effect. While the harmful effect of CKD is most pronounced among the Hispanic subgroup, the estimated OR is greater than 1 across all subgroups, and the posterior credible interval is greater than 1 in the overall analysis. Other covariates have mixed effects on the heat wave effect across groups, but these are the most notable.
Figure 3: Variable Importance and Marginal Partial Dependence:

Panel A displays the proportion of splits in the CL-BART model based on each covariate. Panel B displays the difference in partial average exposure effects for each covariate, except for age (posterior means and 95% credible intervals presented). Numeric values corresponding to the estimates in panel B are provided in the Supplementary Materials. Abbreviations: DEP: depression, DIAB: diabetes, HT: hypertension, HLD: hyperlipidemia.
To examine interaction effects estimated via CL-BART, we fit CART models using the rpart package (Therneau and Atkinson, 2022) to obtain lower-dimensional summaries of the posterior mean individual exposure effects (see the Supplementary Materials for the CART diagrams). For these models, we drop the demographic moderators from the list of predictors to see how well the heterogeneity can be described by the comorbid conditions alone. We then compute for each leaf node represented in the summaries and plot the results in Figure 4. These plots are helpful in that they allow one to view the actual exposure effect, as opposed to just ratios of exposure effects in Figure 3B.
Figure 4: CART-Informed Partial Average Exposure Effects:

Posterior mean and 95% credible intervals for the partial average exposure effects within each leaf of the lower-dimensional CART summaries. Each condition is either present (Y), not present (N), or irrelevant (−). Numeric values and CART diagrams are provided in the Supplementary Materials. Abbreviations: DIAB: diabetes, HT: hypertension, HLD: hyperlipidemia.
In Figure 4, we observe that diabetes appears in 4 out of 5 subgroups, while CKD and CHF are the next most common moderators. Depression is the only condition that did not show up in any of the summaries. In the overall analysis, the estimated association between ED visits and heat waves is very strong for those with CKD, regardless of other important conditions. The subgroup with the most pronounced risks is Non-Hispanic Black. Among patients in this subgroup, the estimated association between ED visit and heat wave is greatest for those without hypertension, though an additional diagnosis of COPD may reduce this. Findings such as this illustrate the importance of considering interaction among moderators when modeling effect heterogeneity.
Unfortunately, the nice interpretations of the CART summaries come at a cost. The summary R2 (Woody et al., 2021) for the CART summaries are relatively high for the Hispanic, Non-Hispanic Asian and Pacific Islander, and Non-Hispanic Black subgroups (0.89, 0.71, and 0.79, respectively), but suggest that much of the finer interactions estimated by CL-BART are not captured. The summary R2 is very low for the Non-Hispanic Other (0.39) and Non-Hispanic White (0.09) subgroups. Age was split on with much greater frequency for these subgroups (Figure 3A), so in addition to struggling to summarise the CL-BART model fit, it is possible that age and/or sex are the drivers of effect heterogeneity in these subgroups. These findings should not dissuade one from studying effect heterogeneity, but they do illustrate the limitation of automating the analysis.
7. Discussion
CL-BART is a helpful tool for estimating heterogeneous effects in the case-crossover study design commonly used in environmental epidemiology. The primary benefit of CL-BART is its ability to detect and estimate important high-order interactions and functional forms of potential effect moderators without requiring prespecification. Interpreting the heterogeneous effects can be challenging, but the proposed strategies revolving around variable importance, partial dependence, and lower-dimensional summaries provide a good start.
In terms of the application, the most consistent finding across most subgroups was that CKD and/or diabetes may modify the response to heat waves among people with AD. Specifically, having CKD was generally associated with an increased risk of ED visit during heat waves, which aligns with previous work that has established an association between kidney-related illness and extreme heat (Johnson et al., 2019; Liu et al., 2021; Hansen et al., 2008). Another key finding was the protective-leaning effect of hypertension, particularly among Non-Hispanic Black people with AD. This finding aligns well with previous studies of extreme heat both in California (Sherbakov et al., 2018) and New York (Lin et al., 2009), and might be attributed to blood vessel dilation in hot weather, decreasing the risk of hypertension-associated morbidity (Barnett et al., 2007). We suspect that a mixture of biological and behavioral changes experienced by and medication(s) taken by those living with these comorbid conditions may be a contributing factor. Finally, while we used co-diagnosis codes at the ED visit to define comorbid conditions, other studies may consider other sources to ascertain pre-existing chronic conditions (e.g., medication use or medical history), to reduce classification error.
We acknowledge room for future improvements to CL-BART. The computation time is the largest limitation at this point in time. The bottleneck is the repeated evaluation of the conditional logistic regression likelihood required for Fisher scoring when determining the proposal distribution G of interim leaf node parameters and the adaptive rejection sampling of the final leaf node parameters. Exploring additional tree proposals such as those described in Pratola (2016) and Deshpande (2024) may improve mixing of the posterior chains, and thus indirectly reduce computation time by lowering the number of MCMC iterations required to reach the stationary distribution. Average runtime for the simulation studies and application analyses are presented in the Supplementary Materials.
Additionally, we have shown that the exposure may either be binary (case study) or continuous (simulations). In both cases, a linear exposure-response relationship is assumed. There are many scenarios where this assumption may be violated. For example, we struggled to achieve model convergence in an exploratory analysis of the ED visit data using continuous daily average temperature as the exposure (results not shown). We suspect a nonlinear exposure-response relationship is at least partly responsible. Extending the CL-BART model to allow for polynomial, splines, and other flexible functions of the exposure could be desirable. For continuous exposure, it may also be interesting to consider short-term lagged effects via a distributed lag nonlinear model (Gasparrini et al., 2010; Guo et al., 2011). Each basis function would require its own forest to be managed, substantially increasing the computational burden of an already burdensome algorithm.
In conclusion, CL-BART serves as a robust alternative to the typical strategies for estimating heterogeneous effects in the case-crossover design, using RJMCMC to integrate the flexibility of BART with traditional conditional logistic regression. This framework offers researchers a powerful tool to disentangle and model heterogeneous effects, whether it be in the context of treatment outcomes, environmental exposures, or any other one-to-many matched case-control study.
Supplementary Material
Acknowledgments
This research was supported by funding from the National Institute of Environmental Health Sciences (NIEHS) of the National Institutes of Health (NIH) under award numbers P20 ES036110 and R01 ES027892-05S1. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH. We are grateful for the support of the health data source California Office of Statewide Planning and Development, now California Department of Health Care Access and Information.
Footnotes
Disclosure Statement
The authors report there are no competing interests to declare.
Contributor Information
Jacob R. Englert, Department of Biostatistics and Bioinformatics, Emory University
Stefanie T. Ebelt, Gangarosa Department of Environmental Health, Emory University
Howard H. Chang, Department of Biostatistics and Bioinformatics, Emory University; Gangarosa Department of Environmental Health, Emory University
References
- Alzheimer’s Association (2023). 2023 Alzheimer’s disease facts and figures. Alzheimer’s & Dementia, 19(4):1598–1695. [Google Scholar]
- Armstrong BG (2003). Fixed Factors that Modify the Effects of Time-Varying Factors: Applying the Case-Only Approach:. Epidemiology, 14(4):467–472. [DOI] [PubMed] [Google Scholar]
- Barnett AG, Sans S, Salomaa V, Kuulasmaa K, and Dobson AJ (2007). The effect of temperature on systolic blood pressure. Blood Pressure Monitoring, 12(3):195–203. [DOI] [PubMed] [Google Scholar]
- Carracedo-Martínez E, Taracido M, Tobias A, Saez M, and Figueiras A (2010). Case-Crossover Analysis of Air Pollution Health Effects: A Systematic Review of Methodology and Application. Environmental Health Perspectives, 118(8):1173–1182. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chi S, Wang C, Jiang T, Zhu X-C, Yu J-T, and Tan L (2015). The Prevalence of Depression in Alzheimer’s Disease: A Systematic Review and Meta-Analysis. Current Alzheimer Research, 12(2):189–198. [DOI] [PubMed] [Google Scholar]
- Chipman HA, George EI, and McCulloch RE (2010). BART: Bayesian additive regression trees. The Annals of Applied Statistics, 4(1):266–298. [Google Scholar]
- Culqui DR, Linares C, Ortiz C, Carmona R, and Díaz J (2017). Association between environmental factors and emergency hospital admissions due to Alzheimer’s disease in Madrid. Science of The Total Environment, 592:451–457. [DOI] [PubMed] [Google Scholar]
- Deshpande SK (2024). flexBART: Flexible Bayesian regression trees with categorical predictors. Journal of Computational and Graphical Statistics, pages 1–18. [Google Scholar]
- Deshpande SK, Bai R, Balocchi C, Starling JE, and Weiss J (2024). VCBART: Bayesian Trees for Varying Coefficients. Bayesian Analysis, pages 1–28. [Google Scholar]
- Friedman JH (1991). Multivariate Adaptive Regression Splines. The Annals of Statistics, 19(1):1–67. [Google Scholar]
- Friedman JH (2001). Greedy function approximation: A gradient boosting machine. The Annals of Statistics, 29(5):1189–1232. [Google Scholar]
- Fritze T (2020). The Effect of Heat and Cold Waves on the Mortality of Persons with Dementia in Germany. Sustainability, 12(9):3664. [Google Scholar]
- Gasparrini A, Armstrong B, and Kenward MG (2010). Distributed lag non-linear models. Statistics in Medicine, 29(21):2224–2234. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gelman A, Hwang J, and Vehtari A (2014). Understanding predictive information criteria for Bayesian models. Statistics and Computing, 24(6):997–1016. [Google Scholar]
- Gilks WR and Wild P (1992). Adaptive Rejection Sampling for Gibbs Sampling. Applied Statistics, 41(2):337–348. [Google Scholar]
- Green PJ (1995). Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika, 82(4):711–732. [Google Scholar]
- Guo Y, Barnett AG, Pan X, Yu W, and Tong S (2011). The Impact of Temperature on Mortality in Tianjin, China: A Case-Crossover Design with a Distributed Lag Nonlinear Model. Environmental Health Perspectives, 119(12):1719–1725. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hahn PR, Murray JS, and Carvalho CM (2020). Bayesian Regression Tree Models for Causal Inference: Regularization, Confounding, and Heterogeneous Effects (with Discussion). Bayesian Analysis, 15(3):965–1056. [Google Scholar]
- Hansen AL, Bi P, Ryan P, Nitschke M, Pisaniello D, and Tucker G (2008). The effect of heat waves on hospital admissions for renal disease in a temperate city of Australia. International Journal of Epidemiology, 37(6):1359–1365. [DOI] [PubMed] [Google Scholar]
- Harper DG, Volicer L, Stopa EG, McKee AC, and et al. (2005). Disturbance of Endogenous Circadian Rhythm in Aging and Alzheimer Disease. The American Journal of Geriatric Psychiatry, 13(5):359–368. Place: Washington Publisher: Elsevier Limited. [DOI] [PubMed] [Google Scholar]
- Hastie T and Tibshirani R (2000). Bayesian backfitting (with comments and a rejoinder by the authors. Statistical Science, 15(3):196–223. [Google Scholar]
- Hill JL (2011). Bayesian Nonparametric Modeling for Causal Inference. Journal of Computational and Graphical Statistics, 20(1):217–240. [Google Scholar]
- Janes H, Sheppard L, and Lumley T (2005). Case-Crossover Analyses of Air Pollution Exposure Data: Referent Selection Strategies and Their Implications for Bias. Epidemiology, 16(6):717–726. [DOI] [PubMed] [Google Scholar]
- Johnson R, Sánchez-Lozada L, Newman L, Lanaspa M, Diaz H, Lemery J, Rodriguez-Iturbe B, Tolan D, Butler-Dawson J, Sato Y, Garcia G, Hernando A, and Roncal-Jimenez C (2019). Climate Change and the Kidney. Annals of Nutrition and Metabolism, 74(Suppl. 3):38–44. [DOI] [PubMed] [Google Scholar]
- Klegeris A, Schulzer M, Harper DG, and McGeer PL (2007). Increase in Core Body Temperature of Alzheimer’s Disease Patients as a Possible Indicator of Chronic Neuroinflammation: A Meta-Analysis. Gerontology, 53(1):7–11. [DOI] [PubMed] [Google Scholar]
- Knowlton K, Rotkin-Ellman M, King G, Margolis HG, Smith D, Solomon G, Trent R, and English P (2009). The 2006 California Heat Wave: Impacts on Hospitalizations and Emergency Department Visits. Environmental Health Perspectives, 117(1):61–67. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lin S, Luo M, Walker RJ, Liu X, Hwang S-A, and Chinery R (2009). Extreme High Temperatures and Hospital Admissions for Respiratory and Cardiovascular Diseases. Epidemiology, 20(5):738–746. [DOI] [PubMed] [Google Scholar]
- Linero AR (2018). Bayesian Regression Trees for High-Dimensional Prediction and Variable Selection. Journal of the American Statistical Association, 113(522):626–636. [Google Scholar]
- Linero AR (2024). Generalized Bayesian Additive Regression Trees Models: Beyond Conditional Conjugacy. Journal of the American Statistical Association, pages 1–14. [Google Scholar]
- Linero AR, Sinha D, and Lipsitz SR (2020). Semiparametric mixed-scale models using shared Bayesian forests. Biometrics, 76(1):131–144. [DOI] [PubMed] [Google Scholar]
- Liu J, Varghese BM, Hansen A, Borg MA, Zhang Y, Driscoll T, Morgan G, Dear K, Gourley M, Capon A, and Bi P (2021). Hot weather as a risk factor for kidney disease outcomes: A systematic review and meta-analysis of epidemiological evidence. Science of The Total Environment, 801:149806. [DOI] [PubMed] [Google Scholar]
- Madrigano J, Ito K, Johnson S, Kinney PL, and Matte T (2015). A Case-Only Study of Vulnerability to Heat Wave–RelatedMortality in New York City (2000–2011). Environmental Health Perspectives, 123(7):672–678. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Murray JS (2021). Log-Linear Bayesian Additive Regression Trees for Multinomial Logistic and Count Regression Models. Journal of the American Statistical Association, 116(534):756–769. [Google Scholar]
- Pratola MT (2016). Efficient Metropolis–Hastings Proposal Mechanisms for Bayesian Regression Tree Models. Bayesian Analysis, 11(3):885–911. [Google Scholar]
- Satlin A, Volicer L, Stopa EG, and Harper D (1995). Circadian locomotor activity and core-body temperature rhythms in Alzheimer’s disease. Neurobiology of Aging, 16(5):765–771. [DOI] [PubMed] [Google Scholar]
- Schwartz J (2005). Who is Sensitive to Extremes of Temperature?: A Case-Only Analysis. Epidemiology, 16(1):67–72. [DOI] [PubMed] [Google Scholar]
- Sherbakov T, Malig B, Guirguis K, Gershunov A, and Basu R (2018). Ambient temperature and added heat wave effects on hospitalizations in California from 1999 to 2009. Environmental Research, 160:83–90. [DOI] [PubMed] [Google Scholar]
- Sonntag D (1990). Important new values of the physical constants of 1986, vapor pressure formulations based on the ITS-90, and psychrometer formulae. Z. Meteorol, 70:340–344. [Google Scholar]
- Sparapani RA, Logan BR, McCulloch RE, and Laud PW (2016). Nonparametric survival analysis using Bayesian Additive Regression Trees (BART). Statistics in Medicine, 35(16):2741–2753. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Therneau T and Atkinson B (2022). rpart: Recursive Partitioning and Regression Trees. [Google Scholar]
- Thornton M, Shrestha R, Wei Y, Thornton P, and Kao S-C (2022). Daymet: Daily Surface Weather Data on a 1-km Grid for North America, Version 4 R1. Publisher: ORNL Distributed Active Archive Center. [Google Scholar]
- Van Hoof J, Kort H, Hensen J, Duijnstee M, and Rutten P (2010). Thermal comfort and the integrated design of homes for older people with dementia. Building and Environment, 45(2):358–370. [Google Scholar]
- Volicer L, Harper DG, Manning BC, Goldstein R, and Satlin A (2001). Sundowning and Circadian Rhythms in Alzheimer’s Disease. American Journal of Psychiatry, 158(5):704–711. [DOI] [PubMed] [Google Scholar]
- Watanabe S and Opper M (2010). Asymptotic Equivalence of Bayes Cross Validation and Widely Applicable Information Criterion in Singular Learning Theory. Journal of Machine Learning Research, 11(116):3571–3594. [Google Scholar]
- Wei Y, Wang Y, Lin C-K, Yin K, Yang J, Shi L, Li L, Zanobetti A, and Schwartz JD (2019). Associations between seasonal temperature and dementia-associated hospitalizations in New England. Environment International, 126:228–233. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Woody S, Carvalho CM, and Murray JS (2021). Model Interpretation Through Lower-Dimensional Posterior Summarization. Journal of Computational and Graphical Statistics, 30(1):144–161. [Google Scholar]
- Xu Z, Crooks JL, Black D, Hu W, and Tong S (2017). Heatwave and infants’ hospital admissions under different heatwave definitions. Environmental Pollution, 229:525–530. [DOI] [PubMed] [Google Scholar]
- Xu Z, Tong S, Cheng J, Zhang Y, Wang N, Zhang Y, Hayixibayi A, and Hu W (2019). Heatwaves, hospitalizations for Alzheimer’s disease, and postdischarge deaths: A population-based cohort study. Environmental Research, 178:108714. [DOI] [PubMed] [Google Scholar]
- Zanobetti A, O’Neill MS, Gronlund CJ, and Schwartz JD (2013). Susceptibility to Mortality in Weather Extremes: Effect Modification by Personal and Small-Area Characteristics. Epidemiology, 24(6):809–819. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zhang Y, Ebelt ST, Shi L, Scovronick NC, D’Souza RR, Steenland K, and Chang HH (2023). Short-term associations between warm-season ambient temperature and emergency department visits for Alzheimer’s disease and related dementia in five US states. Environmental Research, 220:115176. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
