simulate_DM: Title: Simulate Dirichlet-Multinomial Regression Model

View source: R/04_simulation.R

simulate_DMR Documentation

Title: Simulate Dirichlet-Multinomial Regression Model

Description

Title: Simulate Dirichlet-Multinomial Regression Model

Usage

simulate_DM(
  n_obs = 100,
  n_vars = 30,
  n_taxa = 75,
  n_relevant_vars = 4,
  n_relevant_taxa = 4,
  beta_min = 1,
  beta_max = 1.25,
  signoise = 1,
  n_reads_min = 5000,
  n_reads_max = 10000,
  theta0 = 0.01,
  rho = NULL,
  Sigma = NULL
)

Arguments

n_obs

integer Number of observations

n_vars

integer Number of variables

n_taxa

integer Number of taxa

n_relevant_vars

integer Number of variables that are important

n_relevant_taxa

integer Number of important taxa

beta_min

numeric The desired min beta value

beta_max

numeric The desired max beta value

signoise

numeric Default is 1.

n_reads_min

numeric Default is 5000. Used to obtain a random subject from n_reads_min to n_reads_max from the Dirichlet Multinomial Distribution using dirmult::simPop()

n_reads_max

numeric Default is 10000. Used to obtain a random subject from n_reads_min to n_reads_max from the Dirichlet Multinomial Distribution using dirmult::simPop()

rho

numeric Used for covariate correlation between 0 & 1. Default is NULL. Need either rho or Sigma to be input.

Sigma

matrix A symmetric positive definite matrix used for covariate correlation structure columns must match number of covariates. Default is NULL. Need either rho or Sigma to be input.

Value

A list of outcomes including:

  • X = XX

  • Y = YY

  • alphas = intercept,

  • betas = betas,

  • n_reads_min = n_reads_min,

  • n_reads_max = n_reads_max,

  • theta0 = theta0,

  • phi = phi,

  • rho = rho,

  • signoise = signoise,

  • Sigma = Sigma

This function can be used to simulate DM data.

Taken from Wadsworth (2017) An integrative Bayesian Dirichlet-Multinomial regression model for the analysis of taxonomic abundances in microbiome data


Goodgolden/LDTM documentation built on May 25, 2022, 5:25 p.m.