PBmodel | R Documentation |
This function calculates the value of the BPBM regression, defined by:
\mu_{it}=a_{i0}+a_{i1}\cdot\text{SPBal}_{1,t-1}+\cdots+a_{iM}\cdot\text{SPBal}_{M,t-1}
PBmodel(A, MatrizPBmodelo, E, Tt)
A |
Matrix that contains all the parameters of the model. The parameters are written in the matrix in the following order (in an example with three bacteria):
| |||||||||||||||
MatrizPBmodelo |
Matrix. Output of "ObtainingValueSPBal" called "MatrixSPBal". | |||||||||||||||
E |
Number of bacteria in the dataset. | |||||||||||||||
Tt |
Number of time points. |
Returns a matrix. The row i contains the regression values of the bacteria i at all time points.
Creus-MartÃ, I., Moya, A., Santonja, F. J. (2022). Bayesian hierarchical compositional models for analysing longitudinal abundance data from microbiome studies. Complexity, 2022.
A=rbind(c(1,2,3),c(4,5,6),c(7,8,9))
MatrizPBmodelo=cbind(c(1,2,3),c(4,5,6),c(7,8,9))
E=3
Tt=3
PBmodel(A,MatrizPBmodelo, E,Tt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.