Description Usage Arguments Details Value Examples
Run Microbiome Covariance Regression
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
counts |
Matrix containing OTU counts. Rows are samples, columns are OTUs. The last column is considered the reference OTU for the additive log-ratio transformation and is not included in the covariance matrix. |
X |
Design matrix contating covariates of interest. Rows are samples, columns are covariates. Can include intercept column. |
C0 |
Prior mean for "C" parameter. If null, then C0 is set automatically. |
Psi0 |
Prior inverse-Wishart matrix hyperparameter for "Psi" parameter. If null, then Psi0 is set automatically. |
Gamma0 |
Prior inverse-Wishart matrix hyperparameter for "Gamma" parameter. If null, then Gamma0 is set automatically. |
nuPsi |
Prior inverse-Wishart degrees of freedom for "Psi" parameter. If null, then nuPsi is set automatically. |
nuGamma |
Prior inverse-Wishart degrees of freedom for "Gamma" parameter. If null, then nuGamma is set automatically. |
n.chain |
Number of independent MCMC chains to run in parallel |
n.cores |
Number of cores to use to parallelize the MCMC chains |
target.accept.rate |
Target acceptance rate for adaptive Metropolis sampler. |
n.samp |
Number of MCMC samples |
n.burn |
Number of burn-in samples |
adapt.control |
List contatining tuning parameters for adaptive MCMC part. See details section below. |
save.eta.cov |
Logical. Save the proposal distribution variance from the Metropolis sampler? Caution, this will be large. |
verbose |
Logical. Output progress? |
This function allows running the Microbiome Covariance Regession
method on multiple chains in parallel. The user can specify values for
the hyperparameters C0
, Psi0
, Gamma0
, nuPsi
,
and nuGamma
. If they are not specified, then they will be set
automatically.
A list of arguments passed to the adaptive Metropolis sampler for eta
can
be input using the adapt.control
argument. These can be modified
if the eta
parameters do not converge; the default values are
not always optimal. The parameters (and defaults) that can be edited are:
init
: (default 0.1) The initial stepsize for the adaptive Metropolis parameters.
a
: (default 0.5) The adaptation rate. A higher value means the adaptations will vanish more quickly with the number of MCMC steps.
sigma.zero
: (default 1) The initial value of the adaptive Metropolis variance scaling parameter.
An object of class micore
containing one list element for each MCMC chain. Each
list element contains the following attributes:
eta
: An array containing the MCMC samples for the eta parameter. First dimension indexes the MCMC samples.
Psi
: An array containing the MCMC samples for the Psi parameter. First dimension indexes the MCMC samples.
A
: An array containing the MCMC samples for the A parameter. First dimension indexes the MCMC samples.
B
: An array containing the MCMC samples for the B parameter. First dimension indexes the MCMC samples.
gamma
: An array containing the MCMC samples for the gamma_i parameters. First dimension indexes the MCMC samples.
Gamma
: An array containing the MCMC samples for the Gamma (matrix) parameter. First dimension indexes the MCMC samples.
eta.accepted
: A matrix indicating which eta samples were accepted (1) and which were rejected (0). Rows are MCMC iterations, columns are subjects.
sigma.zero
: A matrix containing values of the Metropolis variance scaling parameter for all subjects over all MCMC samples.
acc.probs
: A matrix containing the Metropolis acceptance probabilities for all subjects over all MCMC samples.
counts
: The OTU count matrix.
X
: The model matrix.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.