LogVeroFuncBUENA {CoDaLoMic} | R Documentation |
Writting the loglikelihood of the dirichlet
Description
This function calculates the loglikelihood of the dirichlet for the BPBM model.
Usage
LogVeroFuncBUENA(param, MatrizPBmodelo, E, Tt, especiemodi)
Arguments
param |
Vector. Column "mean" of the output of "StudyingParam" function. | |||||||||
MatrizPBmodelo |
Matrix with the covariates of the model. In an example with two SPBal and three time points, the covariates are written in the following order:
| |||||||||
E |
Number f bacteria in the dataset. | |||||||||
Tt |
Number of time points available | |||||||||
especiemodi |
Matrix that contains at row i the bacterial taxa of bacteria i at time points t=2,..., |
Value
Returns a number with the value of the dirichlet loglikelihood.
References
Creus-MartÃ, I., Moya, A., Santonja, F. J. (2022). Bayesian hierarchical compositional models for analysing longitudinal abundance data from microbiome studies. Complexity, 2022.
Examples
set.seed(314)
especie=t(gtools::rdirichlet(n=2, c(1,2,3)))
E=3
Tt=2
MatrizPBmodelo=rbind(c(1,1),c(-0.3,0.4),c(0.3,0.5))
set.seed(314)
est=Estimating_BPBM(especie,
Tt,
E,
MatrizPBmodelo,
nn.chain=3,
nn.burnin=1000,
nn.sample=5000,
nn.thin=10)
param=est$SamplesAllChains
especiemodi=especie[,-1]
LogVeroFuncBUENA(param,MatrizPBmodelo,E,Tt,especiemodi)
[Package CoDaLoMic version 0.1.1 Index]