View source: R/ExpectedValuess_BPBM.R
ExpectedValuess_BPBM | R Documentation |
This function calculates the value of the dirichlet parameters, the expected value and the variance for the BPBM model.
ExpectedValuess_BPBM(Estimated.Param, MatrizPBmodelo, E, Tt)
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. |
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}
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
.
Creus-MartÃ, I., Moya, A., Santonja, F. J. (2022). Bayesian hierarchical compositional models for analysing longitudinal abundance data from microbiome studies. Complexity, 2022.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.