View source: R/GraphicsPredictionBPBM.R
GraphicsPredictionBPBM | R Documentation |
This function takes into account the data used to estimate and the data used to predict. We use this function when we want to observe the results obtained with the BPBM model.
GraphicsPredictionBPBM(
especie.All,
names.especie,
ExpectedValue.All,
VarianceValue.All,
Pred,
Plot.Tipe,
Varmas,
Varmenos,
Detail
)
especie.All |
Matrix that contains at row i the bacterial taxa of bacteria i at all time points. |
names.especie |
Vector with the names of the bacteria in the same order that are placed in the |
ExpectedValue.All |
Matrix that contains at row i the expected value of the bacterial taxa i at all time points. The bacteria must be placed in the same order than in |
VarianceValue.All |
Matrix that contains at row i the variance of the bacterial taxa i at all time points. The bacteria must be placed in the same order than in |
Pred |
Number. Indicates the time point in which we start predicting. |
Plot.Tipe |
Character. If |
Varmas |
Matrix. Output of "PredictionBPBM" adding "$ExpVarmas". Matrix that contains at row i the expected value plus two times the sqrt(variance) of the bacteria i at all time points t= |
Varmenos |
Matrix. Output of "PredictionBPBM" adding "$ExpVarmenos". Matrix that contains at row i the expected value minus two times the sqrt(variance) of the bacteria i at all time points t= |
Detail |
Character. If |
Returns the indicated plots with a vertical line when the time point is equal to Tt
=Pred-1, in Pred=Tt
+1 the predicction has started.
Creus-MartÃ, I., Moya, A., Santonja, F. J. (2022). Bayesian hierarchical compositional models for analysing longitudinal abundance data from microbiome studies. Complexity, 2022.
names.especie=c("Bact1", "Bact2", "Bact3")
especie.All=cbind(c(0.5,0.3,0.2),
c(0.6,0.3,0.1),
c(0.4,0.1,0.5),
c(0.4,0.1,0.5),
c(0.4,0.1,0.5),
c(0.4,0.1,0.5))
ExpectedValue.All=especie.All[,-1]+0.1
VarianceValue.All=matrix(c(runif(15,0.001,0.004)), 3,5)
Pred=4
Varmas=cbind(matrix(0,3,2),matrix(c(runif(9,0.001,0.004)) ,3 ,3 ))
Varmenos=cbind(matrix(0,3,2),matrix(c(runif(9,0.001,0.004)) ,3 ,3 ))
GraphicsPredictionBPBM(especie.All,
names.especie,
ExpectedValue.All,
VarianceValue.All ,
Pred ,
"Data",
Varmas,
Varmenos,
"no")
GraphicsPredictionBPBM(especie.All,
names.especie,
ExpectedValue.All,
VarianceValue.All ,
Pred ,
"DataExpected",
Varmas,
Varmenos,
"no")
GraphicsPredictionBPBM(especie.All,
names.especie,
ExpectedValue.All,
VarianceValue.All,
Pred ,
"All",
Varmas,
Varmenos,
"no")
GraphicsPredictionBPBM(especie.All,
names.especie,
ExpectedValue.All,
VarianceValue.All ,
Pred ,
"Var",
Varmas,
Varmenos,
"no")
GraphicsPredictionBPBM(especie.All,
names.especie,
ExpectedValue.All,
VarianceValue.All ,
Pred ,
"OnlyVar",
Varmas,
Varmenos,
"no")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.