Estimating_BPBM {CoDaLoMic}R Documentation

Estimating BPBM

Description

The estimation of the BPBM model is carried out using MCMC. To execute this function it is necessary to have the program Just Another Gibbs Sampler (JAGS) (Plummer, 2003) program installed.

Usage

Estimating_BPBM(
  especie,
  Tt,
  E,
  MatrizPBmodelo,
  nn.chain = 3,
  nn.burnin = 5000,
  nn.sample = 20000,
  nn.thin = 10,
  seed = NULL
)

Arguments

especie

Matrix that contains at row i the bacterial taxa of bacteria i at all time points.

Tt

Number of time points available.

E

Number of bacteria in the dataset.

MatrizPBmodelo

Matrix with the covariates of the model. 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}
nn.chain

the number of chains to use with the simulation. Default is 3, minimum2.

nn.burnin

the number of burnin iterations. Default is 5000.

nn.sample

the number of iterations to take. Default: 20000. The markov chain will have ("sample"-"burnin")/"thin" iterations.

nn.thin

the thinning interval to be used. Default: 10.

seed

Number. Set a seed. Default seed=NULL.

Value

Returns a list with:

References

Examples


set.seed(314)
especie=t(gtools::rdirichlet(n=6, c(6,6,1,6,6)))
E=5
Tt=6
MatrizPBmodelo=rbind(c(1,1,1,1,1,1),c(-0.3,0.4,0.3,-0.7,-0.4,-0.6),c(0.3,0.5,-0.3,0.1,0.4,0.1))



Estimating_BPBM(especie,
               Tt,
               E,
               MatrizPBmodelo,
               nn.chain=3,
               nn.burnin=1000,
               nn.sample=2000,
               nn.thin=10,
               714)


[Package CoDaLoMic version 0.1.1 Index]