BalMed_mcmc: This is the main function of balance mediation analysis Runs...

Description Usage Arguments

View source: R/BalMed_mcmc.R

Description

This is the main function of balance mediation analysis Runs a MCMC chain to sampling all the unknown parameters in the model

Usage

1
2
3
BalMed_mcmc(X, Y, Trt, hyperparam, mu0_initial, mu1_initial,
  invSigma_initial, P_initial, z_initial, niters, persaveiters, savepath,
  filename, logfile = "MCMClog.txt")

Arguments

X

compositional matrix

Y

outcome vector

Trt

treatment vector currently only accept binary value

hyperparam

a list containing all the prior distribution informatiion

niters

total number of iterations

persaveiters

save chain information for each of the persaveiters iterations

savepath

the path to save the current chain info

filename

the name of the file to save the current chain info

logfile

name of the file to store some log information

mu0_inital

starting value for the mean in untreated group

mu1_inital

starting value for the mean in the treated group

invSigma_inital

starting value for the variance-covariance matrix

P_inital

starting value for the latent relative abundance matrix

z_inital

starting value for the balance configuration vector z


luhuang-penn/BalMed documentation built on Aug. 3, 2020, 12:57 a.m.