A Bayesian framework for estimating distributed lag linear and non-linear models. Model fitting is implemented using Integrated Nested Laplace Approximation (R package 'INLA'), together with prediction and visualization of exposure-lag-response associations. Additional functions allow estimation of optimal exposure values (e.g., minimum mortality temperature) and computation of attributable fractions and numbers. Models with 'crossbasis' or 'onebasis' terms are supported (R package 'dlnm').

The goal of bdlnm is to provide tools for fitting Bayesian
distributed lag non-linear models (B-DLNM) using the INLA
framework. The package allows users to estimate exposure-lag-response
associations, generate posterior predictions, compute attributable risk
measures, and estimate optimal exposure values within a fully Bayesian
framework.
The package provides functions to:
INLAMore detailed examples and tutorials are available in the package vignettes.
You can install the development version of bdlnm like so:
devtools::install_github("pasahe/bdlnm")
At least the stable version of INLA 23.4.24 (or newest) must be installed beforehand. You can install the newest stable INLA version by:
install.packages("INLA", repos=c(getOption("repos"), INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
If you use bdlnm in your research, please cite:
citation("bdlnm")
This package extends the distributed lag modelling framework implemented
in the dlnm package developed by Gasparrini
(2011) to a Bayesian setting.