Structured Bayesian Regression Tree Models for Estimating Distributed Lag Effects: The R Package dlmtree

by Seongwon Im, Ander Wilson, Daniel Mork · 2025

Read Structured Bayesian Regression Tree Models for Estimating Distributed Lag Effects: The R Package dlmtree by by Seongwon Im, Ander Wilson, Daniel Mork (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-18452.txt.

Introduction

Seongwon Im, Ander Wilson, and Daniel Mork present a software package in a 2025 statistics paper. Health studies often face a lag: exposure today may shape outcomes weeks later. Distributed lag models trace such delayed effects, but wiggly exposure records force smooth fits. A newer tree based version handles the smoothing in a fresh way. Their R package, dlmtree, gathers that method and its extensions in one place.

The paper lays out the ideas behind tree structured lag models in plain steps. Worked examples on simulated data show how to fit each model the package offers. The authors then show how to read the fitted results and draw sound inferences. Freely posted on CRAN, the package lets health researchers use the method without building it from scratch.

Catalog record

CREATORby Seongwon Im, Ander Wilson, Daniel Mork
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE58 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-18452

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Structured Bayesian Regression Tree Models for Estimating Distributed Lag Effects: The R Package dlmtree by Seongwon Im, Ander Wilson, Daniel Mork Abstract When examining the relationship between an exposure and an outcome, there is often a time lag between exposure and the observed effect on the outcome. A common statistical approach for estimating the relationship between the outcome and lagged measurements of exposure is a distributed lag model (DLM). Because repeated measurements are often autocorrelated, the lagged effects are typically constrained to vary smoothly over time. A recent statistical development on the smoothing constraint is a tree structured DLM framework. We present an R package dlmtree, available on CRAN, that integrates tree structured DLM and extensions into a comprehensive software package with user-friendly implementation. A conceptual background on tree structured DLMs and demonstration of the fitting process of each model using simulated data are provided. We also demonstrate inference and interpretation using the fitted models, including summary and visualization. Additionally, a built-in shiny app for heterogeneity analysis is included. 1 Introduction In many fields, there is interest in estimating the lagged relationship between an exposure (or treatment) and an outcome. In such cases, the length of the lag or how the exposure effect varies is often unknown. The lagged relationship can take either of two forms. The first form is the association between the exposure at one time point and an outcome distributed across several subsequent times. For example, the impact of advertisement persists beyond that single time point of the investment ( Koyck, 1954 ; Palda, 1965 ) or exposure to an environmental pollutant affects mortality on the same day and each of the following days ( Schwartz, 2000 ) . The second form is an exposure assessed longitudinally and an outcome assessed post-exposure. Examples of this form are maternal exposure to environmental chemicals during pregnancy on birth outcomes and children’s health and development ( Wilson et al., 2017a ; Chiu et al., 2023 ; Hsu et al., 2023 ) and the effect of training and recovery activities over multiple days on athlete wellness ( Schliep et al., 2021 ) . A popular statistical method to estimate the time-varying association between exposure and outcome is a distributed lag model (DLM). The DLM regresses a scalar outcome on the exposure measured at preceding time points ( Schwartz, 2000 ; Gasparrini et al., 2010 ) . The DLM framework is particularly useful as it allows for estimating time-resolved exposure effects and quantifies the temporal relationship between the exposure and the outcome. Because the repeated measurements of exposure are often correlated, DLMs typically include a smoothing constraint to add temporal structure to the estimated time-specific effects and to regularize the exposure effects in the presence of multicollinearity across the measurements. Constraints include polynomials, splines, and Gaussian processes ( Zanobetti et al., 2000 ; Warren et al., 2012 ) . Notably, Mork and Wilson (2023) introduced an approach for constrained DLM using regression tree structures based on the Bayesian additive regression tree (BART) framework ( Chipman et al., 2010 ) . More recent methods have extended the tree structured DLM framework in several directions, including nonlinear exposure-response relationship ( Mork and Wilson, 2022 ) , models with lagged interaction among multiple exposures ( Mork and Wilson, 2023 ) , and models with heterogeneous lag effects ( Mork et al., 2024 ) . There are several related methods and packages for DLM implementation. Table 1 lists currently available R packages for DLMs that are generally appropriate for the type of epidemiology studies considered in this paper. The dlnm package contains software for estimating a DLM with linear or nonlinear exposure-response relationships using splines for the smoothing constraint ( Gasparrini, 2011 ) . Mork and Wilson (2022) ; Mork and Wilson (2023) compare model performance between the spline-based and tree structured DLM implementations. The dlnm package does not consider heterogeneity or multiple exposures. There are several DLM methods for the linear effect of a single exposure with modification by a single covariate. The dlim package allows for modification by a single continuous factor ( Demateis et al., 2024 ) and the bdlim package allows for modification by a single categorical factor ( Wilson et al., 2017b ) . However, these packages do not allow for multiple candidate modifying factors or multiple exposures. The package DiscreteDLM extends Bayesian estimation to categorical outcomes but does not consider mixtures or heterogeneity ( Dempsey and Wyse, 2025 ) . Hence, the dlmtree package fills several gaps including heterogeneous effects of multiple candidate modifiers and analysis of mixture or multivariate lagged exposures. Table 1: Available DLM related R packages with functionalities Package GLM Nonlinearity Mixture Heterogeneity bdlim ✓ ✓ DiscreteDLM ✓ dlim ✓ ✓ dlmtree ✓ ✓ ✓ ✓ dlnm ✓ ✓ Note: This table excludes packages designed for autoregressive DLMs, which are used in a different context from the models proposed here. In this article, we introduce a comprehensive R package dlmtree which consolidates a wide range of tree structured DLMs. The package offers a user-friendly and computationally efficient environment to fit tree structured DLMs and to address multiple potential research assumptions including nonlinearity, monotonicity and prior information, multiple simultaneous exposures, and heterogeneous lag effects. We first provide a conceptual review of a regression tree as a smoothing constraint in a DLM framework and an overview of the extensions of tree structured DLMs. We present a decision tree to help users select an appropriate model for their analysis. We illustrate the model fitting process with detailed descriptions and syntax of functions for implementing models, obtaining the summary output and inferential information, and plotting the fitted models for visualization. The package is available in the comprehensive R archive network (CRAN) and the installation instructions are provided at https://danielmork.github.io/dlmtree/ . 2 Tree structured DLMs 2.1 DLM tree as a smoothing constraint In this section, we review the regression tree approach to constrained DLM estimation, a key idea underlying the tree structured DLMs in the dlmtree package. Classically, the DLM model is applied to time-series studies, and time is defined in terms of the outcome time. Let y_{t} be the observed outcome and x_{t} the observed exposure at time t for t=1,\ldots,T . For clarity, we assume a continuous outcome when presenting the models. We discuss extensions to generalized linear models in Section 2.4 . The DLM applied to time-series is y_{t}=\sum_{l=1}^{L}x_{t-l}\beta_{l}+\bm{z}_{t}^{\prime}\bm{\gamma}+\varepsilon_{t}, (1) where \beta_{l} is the linear effect of exposure at lag l ( l days prior to the outcome assessment), \bm{z}_{t} is a vector of covariates including the intercept, \bm{\gamma} is a vector of regression coefficients for the covariates, \varepsilon_{t} is independent error assumed to follow \text{Normal}(0,\sigma^{2}) . In this paper, we focus on an alternative and more general representation of the DLM that does not assume repeated assessments of an outcome in a time-series design. Consider a vector of outcomes \bm{y}=(y_{1},\ldots,y_{n}) for a sample i=1,\ldots,n . Suppose we are interested in the lagged association between the outcome and a single longitudinally assessed exposure \bm{x}_{i}=(x_{i1},\ldots,x_{iT}) measured at equally spaced time points, t=1,\ldots,T . Here, exposure time is not explicitly defined relative to the outcome. Most commonly, the exposures are in the T time points prior to outcome assessment, as in

Read the complete text