View source: R/EstParmFunc_FBM.R
EstParmFunc_FBM | R Documentation |
This function calculates the loglikelihood of the dirichlet for the FBM model.
EstParmFunc_FBM(param, especie, E, EspecieMaxima, Tt, especiemodi)
param |
Vector with the parameters in the following order: a11,a12,a13, a21, a22,a23, ...a(D-1)1,a(D-1)2,a(D-1)3,tau. Where D is the number of bacterial species present in the matrix |
especie |
Matrix that contains at row i the bacterial taxa of bacteria i at all time points. |
E |
Number of bacteria available |
EspecieMaxima |
Row in which the bacterial with maximum mean abundance is in |
Tt |
Number of bacteria available |
especiemodi |
Matrix that contains at row i the bacterial taxa of bacteria i at time points t=2,..., |
The regression of this model is defined by
\mu_{it}=a_{i1}+a_{i2}\cdot\text{alr}(x_{i,(t-1)})+a_{i3}\cdot\text{Balance}(x_{i,(t-1)})\text{ for }i=1,\dots, D-1\text{ where } D \text{ is the number of bacteria}
Returns a number with the value of the dirichlet loglikelihood.
Creus-MartÃ, I., Moya, A., Santonja, F. J. (2021). A Dirichlet autoregressive model for the analysis of microbiota time-series data. Complexity, 2021, 1-16.
especie1=cbind(c(0.5,0.3,0.2), c(0.1,0.3,0.6))
especiemodi=especie1[,-1]
tau1=0.4
parms1= cbind(c(0.1,0.2),c(-0.2,0.1),c(0.3,0.2))
parms11=c(as.vector( t(parms1)),tau1)
EstParmFunc_FBM(parms11,especie1,3 ,3 , 2,especiemodi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.