Learn R Programming


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$).

Copy Link

Version

Install

install.packages('simBKMRdata')

Monthly Downloads

497

Version

0.1.1

License

GPL (>= 3)

Maintainer

Kazi Tanvir Hasan

Last Published

April 22nd, 2025

Functions in simBKMRdata (0.1.1)

estimate_mv_moments

Helper function to estimate moment vectors/matrices for observations within a group
generate_mvGamma_data

Generate Multivariate Skewed Gamma Transformed Data
.skewness

Helper function to calculate skewness for a vector
calculate_stats_gaussian

Calculate summary statistics for each group
metalExposChildren_df

Children's Environmental Heavy Metal Exposure Data
simulate_group_data

Simulate Group Data
simulate_group_gamma

Simulate Group Multivariate Data
calculate_stats_gamma

Calculate summary statistics and gamma parameters for each group
calculate_pip_threshold

Calculate PIP Threshold
simulate_group_gaussian

Simulate Group Multivariate Gaussian Data
transformers

Data Transformation Functions
estimate_mv_shape_rate

Helper function to estimate shape, rate, and correlation parameters for observations within a group