PBmodel: Obtaining the regression value of the BPBM

View source: R/PBmodel.R

PBmodelR 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):

a10 a11 a12 ... a1M
a20 a21 a22 ... a2M
a30 a31 a32 ... a3M
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)

CoDaLoMic documentation built on April 12, 2025, 2:18 a.m.