run_bracod {BRACoD.R} | R Documentation |
Run the main BRACoD algorithm
Description
Uses pymc3 to sample the posterior of the model to determine bacteria that are associated with your environmental variable.
Usage
run_bracod(df_relab, env_var, n_sample = 1000, n_burn = 1000, njobs = 4)
Arguments
df_relab |
A dataframe of relative microbiome abundances. Samples are rows and bacteria are columns. |
env_var |
the environmental variable you are evaluating. You need 1 measurement associated with each sample. |
n_sample |
number of posterior samples. |
n_burn |
number of burn-in steps before actual sampling stops. |
njobs |
number of parallel MCMC chains to run. |
Value
the pymc trace object which holds the samples of the posterior distribution
Examples
## Not run:
data(obesity)
r <- simulate_microbiome_counts(obesity)
sim_counts <- r[[1]]
sim_y <- r[[2]]
contributions <- r[[3]]
sim_relab <- scale_counts(sim_counts)
trace <- run_bracod(sim_relab, sim_y, n_sample = 1000, n_burn=1000, njobs=4)
## End(Not run)
[Package BRACoD.R version 0.0.2.0 Index]