GammaIdentity {Bayesiangammareg}R Documentation

Bayesian Gamma Regression with link Identity for the Model of Mean.

Description

Function to do Bayesian Gamma Regression link Identity: Joint Mean and Shape modeling with Identity link for Mean.

Usage

GammaIdentity(Y, X, Z, nsim, bpri, Bpri, gpri, Gpri, burn, jump, graph1, graph2)

Arguments

Y

Object of class matrix, with the dependent variable.

X

Object of class matrix, with the variables for modeling the mean.

Z

Object of class matrix, with the variables for modeling the shape.

nsim

a number that indicate the number of iterations.

bpri

a vector with the initial values of beta.

Bpri

a matrix with the initial values of the variance of beta.

gpri

a vector with the initial values of gamma.

Gpri

a matrix with the initial 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.

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.

Value

object of class bayesiangammareg 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 precision

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

G

object of class matrix with the G values

yestimado

object of class matrix with the fitted values of y

residuals

object of class matrix with the residuals of the regression

phi

object of class matrix with the precision terms of the regression

variance

object of class matrix with the variance terms 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

Author(s)

Arturo Camargo Lozano bacamargol@unal.edu.co, Edilberto Cepeda-Cuervo ecepedac@unal.edu.co

References

1. Cepeda-Cuervo E. (2001) Modelagem da variabilidade em modelos lineares generalizados. Ph.D. tesis. Instituto de Matematicas. Universidade Federal do Rio do Janeiro. 2. Cepeda-Cuervo E. and Gamerman D. (2005). Bayesian Methodology for modeling parameters in the two-parameter exponential family. Estadistica 57, 93 105. 3. Cepeda Cuervo E. and Gamerman D. (2001). Bayesian Modeling of Variance Heterogeneity in Normal Regression Models. Brazilian Journal of Probability and Statistics. 14, 207-221.

Examples

X1 <- rep(1,50)
X2 <- runif(50,0,30)
X3 <- runif(50,0,20)
X4 <- runif(50,10,20)
mui <- 15 + 3*X2 + 2*X3
alphai <- exp(3 + 0.15*X2 + 0.15*X4)
Y <- rgamma(50,shape=alphai,scale=mui/alphai)
X <- cbind(X1,X2,X3)
Z <- cbind(X1,X2,X4)
bpri <- c(1,1,1)
Bpri <- diag(10^(3),nrow=ncol(X),ncol=ncol(X))
gpri <- c(0,0,0)
Gpri <- diag(10^(3),nrow=ncol(Z),ncol=ncol(Z))
burn <- 0
jump <- 1
nsim <- 300
graph1=FALSE
graph2=FALSE
Bayesiangammareg(Y,X,Z,nsim,bpri,Bpri,gpri,Gpri,burn,jump,graph1,graph2,"ide")

[Package Bayesiangammareg version 0.1.0 Index]