Open mmp3 opened 3 years ago
Hi,
Thanks for the questions.
To fit LTN to exchangeable samples and obtain posterior samples of $\mu$ and $\Omega$, use gibbs_ltn
. You will need to input your data and specify the number of Gibbs iterations. gibbs_ltn
allows two forms of input data:
phyloseq
object that at least contains an OTU table and the corresponding phylogenetic tree. In this case, set the data
parameter to the phyloseq
object. Y
and YL
, where Y[i,j]=total counts of all descendant OTUs of node j in sample i, and YL[i,j]=total counts of all descendant OTUs of the left child of node j in sample i.You only need to specify either data
or Y
and YL
.
Details of other parameters can be found in the documentation of this function.
The output is a list of posterior samples of $\mu$ and $\Omega$, the population mean and precision matrix.
To fit the mixed-effects model for two-group comparison, for example on a longitudinal dataset, use ltnme
. The parameters are similar to those of gibbs_ltn
and details can be found in the documentation of this function. The output consists of four parts:
gibbs_samples
PJAP
: the posterior joint probability of existence of cross-group differencePMAP
: the posterior probability of existence of cross-group difference at each nodealpha_mean
: posterior mean of $\alpha$, defined as alpha[j]=difference of the log-odds at node j between the two groups. You can find some examples on these two functions here.
Regarding prediction, we did not specifically implement functions for this task. Could you be more specific on what you want to predict? If you want posterior predictive samples of the OTU counts in the case 1 above, it can be generated from the output of gibbs_ltn
. Otherwise it might be more complicated both in the sense of coding and modelling.
Hi!
Thank you for creating this R package. How do you use the functions to fit a model and then predict on new data?
Thank you!