bdlim

Code for fitting and interpreting Bayesian distributed lag interaction models (BDLIMs).

https://github.com/anderwilson/bdlim

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Code for fitting and interpreting Bayesian distributed lag interaction models (BDLIMs).

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 2
Created about 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.md

bdlim

R-CMD-check CRAN status Downloads <!-- badges: end -->

Overview

bdlim is an R package that implements Bayesian distributed lag interaction models (BDLIMs). This is a developmental package to replace code in regimes. I am currently testing the package and building additional functionality. Background on the model can be found in:

  • Wilson A, Chiu YM, Hsu HL, Wright RO, Wright RJ, Coull BA (2017). “Bayesian distributed lag interaction models to identify perinatal windows of vulnerability in children's health.” Biostatistics, 18(3), 537–552. (DOI: 10.1093/biostatistics/kxx002, arXiv preprint)

In short, BDLIM estimated a distributed lag model (DLM) with modification by a single categorical variable. The categorical variable can be binary or more than two levels, but BDLIM is not advised when there are a large number of categories. If you are instead interested in a DLM with modification by a single continuous variable see the dlim package (see website here). If you are interested in distributed lag models with heterogeneity by with multiple modifiers see the heterogeneous distributed lag model in the dlmtree package.

This package includes several improvements over the previous software. Many of these improvements come from user feedback and more experiance applying the BDLIM to multiple datasets. These include:

  • Simpler syntax
  • Updated options with some no longer recommended hyperparameter settings no longer available
  • Faster with options for parallel implementation
  • Summary and plot functions that provide more intuitive results.

Installation

The package can be installed from CRAN with the following code.

r install.packages("bdlim")

Alternatively, it can be installed from GitHub using the code below.

r remotes::install_github("anderwilson/bdlim")

Use

A vignette can be accessed at anderwilson.github.io/bdlim/articles/bdlim.html.

The main function is bdlim4. See the help file for that function for a simple example. The summary and plot functions can be used to make inference on the results. Specifically:

  • The model probabilities from the summary or indicate which pattern of heterogeneity is best supported by the data.
  • Cumulative effect estimates are provided in the summary function output.
  • The plot function show estimated distributed lag functions for each group. This returns a ggplot object that can be modified. See the help file example for plot.summary.bdlim4 for an example that modifies the plot.
  • Estimates of the distributed lag functions are available in the summary object but are not printed in the console. See the help file for summary.bdlim4 for an example.

The example in the package do not use parallel implementation. If you have 4 cores available, try using the parallel=TRUE option.

Owner

  • Name: Ander Wilson
  • Login: AnderWilson
  • Kind: user
  • Location: Fort Collins, CO
  • Company: Colorado State Universtiy

GitHub Events

Total
  • Issues event: 1
  • Push event: 6
Last Year
  • Issues event: 1
  • Push event: 6

Packages

  • Total packages: 1
  • Total downloads:
    • cran 250 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: bdlim

Bayesian Distributed Lag Interaction Models

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 250 Last month
Rankings
Dependent packages count: 28.9%
Dependent repos count: 35.6%
Average: 49.9%
Downloads: 85.2%
Maintainers (1)
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • LaplacesDemon * imports
  • dplyr * imports
  • ggplot2 * imports
  • parallel * imports
  • tidyr * imports
  • knitr * suggests
  • rmarkdown * suggests
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite