ExpectedValuess_BPBM {CoDaLoMic} | R Documentation |
Obtainig the value of the dirichlet parameters, the expected value and the variance.
Description
This function calculates the value of the dirichlet parameters, the expected value and the variance for the BPBM model.
Usage
ExpectedValuess_BPBM(Estimated.Param, MatrizPBmodelo, E, Tt)
Arguments
Estimated.Param |
Vector with the estimate parameters. Column "mean" of the output of "StudyingParam" function. |
MatrizPBmodelo |
Matrix. Output of "ObtainingValueSPBal" called "MatrixSPBal". |
E |
Number of bacteria available. |
Tt |
Number of time points available. |
Details
The regression of this model is defined by:
\mu_{it}=a_{i0}+a_{i1}\cdot\text{SPBal}_{1,t-1}+\cdots+a_{iM}\cdot\text{SPBal}_{M,t-1}
Value
Returns a list with:
Dirichlet.Param: Matrix. Matrix that contains at row i the dirichlet parameter of the bacteria i at all time points.
Expected.Value: Matrix. Matrix that contains at row i the expected value of the bacteria i at all time points. The bacterias are placed at the same orden than in
especies
.Variance.Value: Matrix. Matrix that contains at row i the variance of the bacteria i at all time points. The bacterias are placed at the same orden than in
especies
.
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
Tt=3
E=3
Estimated.Param=c(0.1 ,0.4, 0.7, 0.2 ,0.5, 0.8 ,0.3, 0.6, 0.9,
0.1, 0.4 ,0.7, 0.2, 0.5, 0.8, 0.3 ,0.6, 0.9)
MatrizPBmodelo=rbind(c(1,1,1),c(0.3,0.6,-0.1),c(0.2,-0.4,0.3))
ExpectedValuess_BPBM(Estimated.Param,MatrizPBmodelo,E,Tt)