BPBM_Matrix | R Documentation |
This function writes the matrix of covariates of the BPBM.
BPBM_Matrix(rows.position, PB, Tt)
rows.position |
Vector. Vector with the number of the rows where the SPBal are in the matrix PB. We write first the row in which the balance with higher variance is placed, then the row in which the balance with second higher variance is placed... |
PB |
Matrix. Each line os the matrix PB contains the values of one principal balance at all time points. |
Tt |
Number of time points available. |
In an example with two SPBal and three time points, the covariates are written in the following order:
1 | 1 | 1 |
SPBal_{1,t-1} | SPBal_{1,t-2} | SPBal_{1,t-3} |
SPBal_{2,t-1} | SPBal_{2,t-2} | SPBal_{2,t-3} |
Returns a matrix with the covariates of the model.
Creus-MartÃ, I., Moya, A., Santonja, F. J. (2022). Bayesian hierarchical compositional models for analysing longitudinal abundance data from microbiome studies. Complexity, 2022.
matt=matrix(c(1:12),3,4)
rows.position=c(2,3)
BPBM_Matrix(rows.position,matt,4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.