Description Usage Arguments Details Value Author(s) Examples
Performs the comparison criterias for the Bayesian Beta Regression
1 | criteria(X,beta.residuals)
|
X |
object of class matrix, with the independent variable for the mean |
beta.residuals |
object of class bayesbetareg, with the residuals of the Bayesian Beta regression, that can be calculated by the function beta.residuals |
This function calculate the residuals of a bayesian beta regression.
deviance |
the deviance criteria |
AIC |
the AiC criteria |
BIC |
the BIC criteria |
Daniel Jaimes dajaimesc@unal.edu.co, Margarita Marin mmarinj@unal.edu.co, Javier Rojas jarojasag@unal.edu.co, Martha Corrales martha.corrales@usa.edu.co Maria Fernanda Zarate mfzaratej@unal.edu.co Ricardo Duplat rrduplatd@unal.edu.co Luis Villaraga lfvillarragap@unal.edu.co Edilberto Cepeda-Cuervo ecepedac@unal.edu.co,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | library(betareg)
data(ReadingSkills)
Y <- as.matrix(ReadingSkills[,1])
n <- length(Y)
X1 <- as.matrix(ReadingSkills[,2])
for(i in 1:length(X1)){
X1 <- replace(X1,X1=="yes",1)
X1 <- replace(X1,X1=="no",0)
}
X0 <- rep(1, times=n)
X1 <- as.numeric(X1)
X2 <- as.matrix(ReadingSkills[,3])
X3 <- X1*X2
X <- cbind(X0,X1,X2,X3)
Z0 <- X0
Z <- cbind(X0,X1)
burn <- 0.3
jump <- 3
nsim <- 400
bpri <- c(0,0,0,0)
Bpri <- diag(100,nrow=ncol(X),ncol=ncol(X))
gpri <- c(0,0)
Gpri <- diag(10,nrow=ncol(Z),ncol=ncol(Z))
re<-Bayesianbetareg(Y,X,Z,nsim,bpri,Bpri,gpri,Gpri,0.3,3,graph1=FALSE,graph2=FALSE)
summary(re)
readingskillsresiduals<- betaresiduals(Y,X,re)
readingskillscriterias <- criteria(X,readingskillsresiduals)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.