PBmodel {CoDaLoMic} | R Documentation |
Obtaining the regression value of the BPBM
Description
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}
Usage
PBmodel(A, MatrizPBmodelo, E, Tt)
Arguments
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. |
Value
Returns a matrix. The row i contains the regression values of the bacteria i at all time points.
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
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)
[Package CoDaLoMic version 0.1.1 Index]