Title: | Negative Binomial and Beta Binomial Bayesian Regression Models |
---|---|
Description: | The Negative Binomial regression with mean and shape modeling and mean and variance modeling and Beta Binomial regression with mean and dispersion modeling. |
Authors: | Edilberto Cepeda-Cuervo, Maria Victoria Cifuentes-Amado and Margarita Marin |
Maintainer: | Edilberto Cepeda <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-12-14 06:24:59 UTC |
Source: | CRAN |
Function to estimate a Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
Package: | NegBinBetaBinreg |
Type: | Package |
Version: | 1.0 |
Date: | 2016-10-8 |
License: | GPL-2 |
LazyLoad: | yes |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
Performs the comparison criterias for the Bayesian Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
criteria(objeto)
criteria(objeto)
objeto |
object of class NegBinBetaBinreg |
This function calculate the information criteria for a Bayesian Negative Binomial regression with mean and shape modeling and mean and variance modeling and Beta Binomial regression with mean and dispersion modeling.
AIC |
the AiC criteria |
BIC |
the BIC criteria |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
Propose a value for posterior distribution of the beta parameter
dpostb(y,x,z,betas,gammas,bpri,Bpri,model,m)
dpostb(y,x,z,betas,gammas,bpri,Bpri,model,m)
y |
object of class matrix, 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 variance |
betas |
a vector with the previous proposal beta parameters |
gammas |
a vector with the previous proposal gamma parameters |
bpri |
a vector with the initial values of beta |
Bpri |
a matrix with the initial values of the variance of beta |
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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
Generate a proposal for the beta parameter according to the model proposed by Cepeda and Gamerman(2005).
value |
a matrix with the proposal for beta |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Propose a value for posterior distribution of the gamma parameter
dpostg(y,x,z,betas,gammas,gpri,Gpri,model,m)
dpostg(y,x,z,betas,gammas,gpri,Gpri,model,m)
y |
object of class matrix, 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 variance |
betas |
a vector with the previous proposal beta parameters |
gammas |
a vector with the previous proposal gamma parameters |
gpri |
a vector with the initial values of gamma |
Gpri |
a matrix with the initial values of the variance 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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
Generate a proposal for the beta parameter according to the model proposed by Cepeda(2001) and Cepeda and Gamerman(2005).
value |
a integer with the value of the posterior density for gamma |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
evaluate the probability of a gamma parameter from the probability density function defined by old parameters
gammakernel(y, x, z,betas.ini,gammas.now,gammas.old,gpri,Gpri,model,m,ni)
gammakernel(y, x, z,betas.ini,gammas.now,gammas.old,gpri,Gpri,model,m,ni)
y |
object of class matrix, 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 variance |
betas.ini |
a vector with the beta that define the old p.d.f |
gammas.now |
a vector with the gamma parameter - new parameters - to evaluate in the old p.d.f |
gammas.old |
a vector with the gamma that define the old p.d.f |
gpri |
a vector with the initial values of gamma |
Gpri |
a matrix with the initial values of the variance 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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
ni |
It 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 |
Evaluate the probability of a gamma parameter from the probability density function defined by old parameters, according with the model proposed by Cepeda(2001) and Cepeda and Gamerman(2005).
value |
a vector with the probability for the gamma parameter from the probability density function defined by old parameters |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Propose a value for the gamma parameter
gammaproposal(y, x, z, betas.ini,gammas.ini,gpri,Gpri,model,m,ni)
gammaproposal(y, x, z, betas.ini,gammas.ini,gpri,Gpri,model,m,ni)
y |
object of class matrix, 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 variance |
betas.ini |
a vector with the previous proposal beta parameters |
gammas.ini |
a vector with the previous proposal gamma parameters |
gpri |
a vector with the initial values of gamma |
Gpri |
a matrix with the initial values of the variance 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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
ni |
It 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 |
Generate a proposal for the gamma parameter according to the model proposed by Cepeda(2001) and Cepeda and Gamerman(2005).
value |
a number with the proposal for the gamma parameter |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
evaluate the probability of a beta parameter from the probability density function defined by old parameters
mukernel(y, x, z, betas.now,betas.old,gammas.ini,bpri,Bpri,model,m,ni)
mukernel(y, x, z, betas.now,betas.old,gammas.ini,bpri,Bpri,model,m,ni)
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. |
betas.now |
a vector with the beta parameter, new parameter, to evaluate in the old p.d.f |
betas.old |
a vector with the beta that define the old p.d.f |
gammas.ini |
a vector with the gamma that define the old p.d.f |
bpri |
a vector with the prior values of beta. |
Bpri |
a matrix with the prior values of the variance of beta. |
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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
ni |
It 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 |
Evaluate the probability of a beta parameter from the probability density function defined by old parameters, according with the model proposed by Cepeda(2001) and Cepeda and Gamerman(2005).
value |
a matrix with the probability for the beta parameter from the probability density function defined by old parameters |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Propose a value for the beta parameter
muproposal(y, x, z, betas.ini,gammas.ini,bpri,Bpri,model,m,ni)
muproposal(y, x, z, betas.ini,gammas.ini,bpri,Bpri,model,m,ni)
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. |
betas.ini |
a vector with the beta that define the old p.d.f |
gammas.ini |
a vector with the gamma that define the old p.d.f |
bpri |
a vector with the prior values of beta. |
Bpri |
a matrix with the prior values of the variance of beta. |
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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
ni |
It 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 |
Generate a proposal for the beta parameter according to the model proposed by Cepeda(2001) and Cepeda and Gamerman(2005).
value |
a matrix with the proposal for beta |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Function to estimate a Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
NegBinBetaBinreg(y,x,z,nsim,bpri,Bpri, gpri,Gpri,burn,jump,bini,gini,model,m,ni,graph1,graph2)
NegBinBetaBinreg(y,x,z,nsim,bpri,Bpri, gpri,Gpri,burn,jump,bini,gini,model,m,ni,graph1,graph2)
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. |
The Bayesian Negative Binomial regression allow the joint modelling of mean and shape or variance of a negative binomial distributed variable, as is proposed in Cepeda (2001), with exponential link for the mean and the shape or variance. The Bayesian Beta Binomial regression allow the joint modelling of mean and precision of a beta binomial distributed variable, as is proposed in Cepeda (2001), with logit link for the mean and exponential link for the precision.
object of class NegBinBetaBinreg with:
coefficients |
object of class matrix with the estimated coefficients of beta and gamma. |
desv |
object of class matrix with the estimated desviations of beta and gamma. |
interv |
object of class matrix with the estimated confidence intervals of beta and gamma. |
fitted.values |
object of class matrix with the fitted values of y. |
residuals |
object of class matrix with the residuals of the regression. |
estresiduals |
object of class matrix with the standardized residuals of the regression. |
beta.mcmc |
object of class matrix with the complete chains for beta. |
gamma.mcmc |
object of class matrix with the complete chains for gamma. |
beta.mcmc.short |
object of class matrix with the chains for beta after the burned process. |
gamma.mcmc.short |
object of class matrix with the chains for gamma after the burned process. |
aceptbeta |
object of class integer with the acceptance rate for the beta values. |
aceptgamma |
object of class integer with the acceptance rate for the gamma values. |
call |
Call. |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
rm(list=ls(all=TRUE)) Y<-c(6,6,9,13,23,25,32,53,54,5,5,11,17,19,2,8,13,14,20,47, 48,60,81,6,17,67,0,0,2,7,11,12,0,0,5,5,5,11,17,3,4,22, 30,36,0,1,5,7,8,16,27,25,10,11,20,33,0,1,5,5,5,5,5,7,7,11,15,5,6,6,7,14 ) y <- Y <- Y[1:68] x0<-rep(1,times=68) x2<-c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ) x3<-c(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0, 0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1, 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1 ) x<-cbind(x0,x2,x3) z0<-rep(1,times=68) z<-cbind(z0,x2) Bpri=diag(rep(1,3)) bpri=rep(0,3) Gpri=diag(rep(1,2)) gpri=rep(0,2) Bini=diag(rep(1,3)) bini=c(3,-1,-0.5) Gini=diag(rep(1,2)) gini=c(3,-1) nsim = 300 burn <- 0.1 jump <- 5 model <- "NB1" m <- 360 ni <- NULL re<- NegBinBetaBinregEst (y,x,z,nsim,bpri, Bpri,gpri,Gpri,burn,jump,bini,gini, model,m,ni,graph1=FALSE,graph2=FALSE) summary(re)
rm(list=ls(all=TRUE)) Y<-c(6,6,9,13,23,25,32,53,54,5,5,11,17,19,2,8,13,14,20,47, 48,60,81,6,17,67,0,0,2,7,11,12,0,0,5,5,5,11,17,3,4,22, 30,36,0,1,5,7,8,16,27,25,10,11,20,33,0,1,5,5,5,5,5,7,7,11,15,5,6,6,7,14 ) y <- Y <- Y[1:68] x0<-rep(1,times=68) x2<-c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ) x3<-c(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0, 0,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1, 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1 ) x<-cbind(x0,x2,x3) z0<-rep(1,times=68) z<-cbind(z0,x2) Bpri=diag(rep(1,3)) bpri=rep(0,3) Gpri=diag(rep(1,2)) gpri=rep(0,2) Bini=diag(rep(1,3)) bini=c(3,-1,-0.5) Gini=diag(rep(1,2)) gini=c(3,-1) nsim = 300 burn <- 0.1 jump <- 5 model <- "NB1" m <- 360 ni <- NULL re<- NegBinBetaBinregEst (y,x,z,nsim,bpri, Bpri,gpri,Gpri,burn,jump,bini,gini, model,m,ni,graph1=FALSE,graph2=FALSE) summary(re)
Function to estimate a Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
NegBinBetaBinregEst(y,x,z,nsim,bpri,Bpri, gpri,Gpri,burn,jump,bini,gini,model,m,ni,graph1,graph2)
NegBinBetaBinregEst(y,x,z,nsim,bpri,Bpri, gpri,Gpri,burn,jump,bini,gini,model,m,ni,graph1,graph2)
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. |
The Bayesian Negative Binomial regression allow the joint modelling of mean and shape or variance of a negative binomial distributed variable, as is proposed in Cepeda (2001), with exponential link for the mean and the shape or variance. The Bayesian Beta Binomial regression allow the joint modelling of mean and precision of a beta binomial distributed variable, as is proposed in Cepeda (2001), with logit link for the mean and exponential link for the precision.
object of class bayesbetareg
with the following:
Bestimado |
object of class matrix with the estimated coefficients of beta |
Gammaest |
object of class matrix with the estimated coefficients of gamma |
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. |
DesvBeta |
object of class matrix with the estimated desviations of beta |
DesvGamma |
object of class matrix with the estimated desviations of gamma |
B |
object of class matrix with the B values of the confidence intervals for beta |
G |
object of class matrix with the G values of the confidence intervals for gamma |
yestimado |
object of class matrix with the fitted values of y |
residuales |
object of class matrix with the residuals of the regression |
residuales |
object of class matrix with the standardized residuals of the regression |
beta.mcmc |
object of class matrix with the complete chains for beta |
gamma.mcmc |
object of class matrix with the complete chains for gamma |
beta.mcmc.auto |
object of class matrix with the chains for beta after the burned process |
gamma.mcmc.auto |
object of class matrix with the chains for gamma after the burned process |
aceptbeta |
object of class matrix with the acceptance rate for the betas |
aceptgamma |
object of class matrix with the acceptance rate for the gammas |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Print the Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
## S3 method for class 'NegBinBetaBinreg' print(x,...)
## S3 method for class 'NegBinBetaBinreg' print(x,...)
x |
object of class NegBinBetaBinreg |
... |
not used. |
print the Negative Binomial regression with mean and shape modeling and mean and variance modeling and Beta Binomial regression with mean and dispersion modeling
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Print the summary for a Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
## S3 method for class 'summary.NegBinBetaBinreg' print(x, ...)
## S3 method for class 'summary.NegBinBetaBinreg' print(x, ...)
x |
object of class NegBinBetaBinreg |
... |
not used. |
Print the summary for a Negative Binomial regression with mean and shape modeling and mean and variance modeling and Beta Binomial regression with mean and dispersion modeling
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
Print the Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
## S3 method for class 'NegBinBetaBinreg' summary(object, ...)
## S3 method for class 'NegBinBetaBinreg' summary(object, ...)
object |
an object of class NegBinBetaBinreg |
... |
not used. |
call |
Call |
coefficients |
Coefficients |
AIC |
AIC |
BIC |
BIC |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.
calculate the likelihood value for the Negative Binomial regression models with mean and shape (or variance) regression structures, and Beta Binomial regression with mean and dispersion regression structures.
veros(y,x,z,betas,gammas,model,m)
veros(y,x,z,betas,gammas,model,m)
y |
object of class matrix, 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 variance |
betas |
a vector with the previous proposal beta parameters |
gammas |
a vector with the previous proposal gamma parameters |
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 |
It is positive integer that In the Beta Binomial model indicates the number of trials. By default, is the number of data |
calculate the likelihood value for the Negative Binomial regression with mean and shape modeling and mean and variance modeling and Beta Binomial regression with mean and dispersion modeling.
value |
a integer with the likelihood |
Edilberto Cepeda-Cuervo [email protected], Maria Victoria Cifuentes-Amado [email protected], Margarita Marin [email protected]
1. Cepeda C. E. (2001). Modelagem da variabilidade em modelos lineares generalizados. Unpublished Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. //http://www.docentes.unal.edu.co/ecepedac/docs/MODELAGEM20DA20VARIABILIDADE.pdf. http://www.bdigital.unal.edu.co/9394/. 2.Cepeda, E. C. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. // 3.Cepeda, E. and Garrido, L. (2011). Bayesian beta regression models: joint mean and precision modeling. Universidad Nacional // 4.Cepeda, E. and Migon, H. and Garrido, L. and Achcar, J. (2012) Generalized Linear models with random effects in the two parameter exponential family. Journal of Statistical Computation and Simulation. 1, 1 13. // 5.Cepeda-Cuervo, E. and Cifuentes-Amado, V. (2016) Double generalized beta-binomial and negative binomial regression. To appear.