Usage
NegBinBetaBinregEst(y,x,z,nsim,bpri,Bpri,
gpri,Gpri,burn,jump,bini,gini,model,m,ni,graph1,graph2)
Arguments
y
object of class matrix or vector, with the dependent variable.
x
object of class matrix, with the variables for modelling the mean.
z
object of class matrix, with the variables for modelling the shape, variance or dispersion.
nsim
a number that indicate the number of iterations.
bpri
a vector with the prior values of beta.
Bpri
a matrix with the prior values of the variance of beta.
gpri
a vector with the prior values of gamma.
Gpri
a matrix with the prior values of the variance of gamma.
burn
a proportion that indicate the number of iterations to be burn at the beginning of the chain.
jump
a number that indicate the distance between samples of the autocorrelated the chain, to be excluded from the final chain.
bini
a vector with the initial values of beta.
gini
a vector with the initial values of gamma.
model
it indicates the model that will be used. By default, is the Beta Binomial model (BB), but it could also be the Negative Binomial with mean and shape (NB1) or the Negative Binomial with mean and variance (NB2).
m
Is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data
ni
Is a vector of positive integer that In the Beta Binomial model indicates the number of trials to each individual. By default, is a vector of m
graph1
if it is TRUE present the graph of the chains without jump and burn.
graph2
if it is TRUE present the graph of the chains with jump and burn.