Helper Functions for Bayesian Kernel Machine Regression

Provides a suite of helper functions to support Bayesian Kernel Machine Regression (BKMR) analyses in environmental health research. It enables the simulation of realistic multivariate exposure data using Multivariate Skewed Gamma distributions, estimation of distributional parameters by subgroup, and application of adaptive, data-driven thresholds for feature selection via Posterior Inclusion Probabilities (PIPs). It is especially suited for handling skewed exposure data and enhancing the interpretability of BKMR results through principled variable selection. The methodology is described in Hasan et al. (2025) and .



title: "simBKMRdata" author: "Kazi Tanvir Hasan and Gabriel Odom"

Simulate multivariate normal or multivariate skewed exposure data for downstream in silico experiments with Bayesian Kernel Machine Regression.

Outline of Functions

  1. (Graphically) Assess Skewness of Exposure variables $z_i$: this part we will show as examples in the vignettes, but we won't include functions.
  2. Transformation Functions:
    • To Normality: $(z - \bar{z})/\text{sd}(z)$; $\log_{b}\left[(z - \bar{z})/\text{sd}(z)\right]$
    • To Gamma: $z/\text{sd}(z)$; $\log_{b}\left[z/\text{sd}(z)\right]$; $\log_{b}\left[(z+1)/\text{sd}(z+1)\right]$
  3. Calculate List of Parameters for Groups $i = 1, \ldots, G$
    • MV Normal: $n_i$, $\hat{\boldsymbol\mu}_i$, $\hat{\boldsymbol\Sigma}_i$
    • MV Skew Gamma: $n_i$, $\hat{\alpha}_i$, $\hat{\beta}_i$, $\hat{\mathbb{P}}_i$ (group Spearman correlation matrix Rho)
  4. Simulate List of Exposure Data Sets for Groups $i = 1, \ldots, G$
  5. Use BKMR to analyze the simulated data (we will show some quick examples in vignettes, but not include any functions)
  6. Calculate a PIP threshold that preserves a 5% test size for real or simulated data (as close as we can for now). This function should only depend on the response vector, or summary statistics of it (specifically $|\text{cv}(y)|$ and $n$).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("simBKMRdata")

0.2.2 by Kazi Tanvir Hasan, 21 days ago


https://github.com/khasa006/simBKMRdata


Report a bug at https://github.com/khasa006/simBKMRdata/issues


Browse source code at https://github.com/cran/simBKMRdata


Authors: Kazi Tanvir Hasan [aut, cre] (ORCID: , Ibrahimou Boubakari [aut] (ORCID: , Guerini Cristian [aut] , Bursac Zoran [aut] , Roberto Lucchini [aut] , Gabriel Odom [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports MASS, stats

Suggests bkmr, fields, gt, quarto, testthat, tidyverse


See at CRAN