This is the main function of balance mediation analysis Runs a MCMC chain to sampling all the unknown parameters in the model
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")
|
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.