simulate_DTM: Title: Simulate Dirichlet-Multinomial-Tree Regression Model

View source: R/04_simulation.R

simulate_DTMR Documentation

Title: Simulate Dirichlet-Multinomial-Tree Regression Model

Description

Wrapper function for the Rcpp code to simulate DTM data Taken from Wadsworth (2017)

Usage

simulate_DTM(
  subject_sim = 100,
  tree = NULL,
  num_leaf = 10,
  covariates_sim = 50,
  rho = NULL,
  Sigma = NULL,
  X = X,
  zeta_sim = zeta,
  rep = rep,
  num_branch = 3,
  num_cov = 5,
  phi_min = 0.9,
  phi_max = 1.2,
  seed = 555
)

Arguments

subject_sim

integer Number of subjects to simulate, default = 100

tree

phylo Tree structure for simulated data, default is NULL.

num_leaf

integer The number of leaves in tree to simulate

covariates_sim

integer Number of covariates to simulate, default = 50

rho

numeric Correlation structure between 0 & 1, default = 0.20

Sigma

matrix Variance-covariance matrix must be symmetric positive semi-definite

num_branch

integer Number of branches the associated covariates are in, default = 3

num_cov

integer Number of associated covariates to simulate, default = 5

seed

integer Seed for reproducibility, default = 555

Value

A list of results:

  • Y: the compositional counts

  • X: the covariates design matrix

  • phi_sim: true regression coefficients

  • zeta_sim: true inclusion indicators

  • tree: the random tree, phylo object generated by the ape package

  • Sigma: the simulated covariance matrix


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