Bayesiangammareg {Bayesiangammareg} | R Documentation |

Function to do Bayesian Gamma Regression: Joint Mean and Shape Modeling

Bayesiangammareg(Y, X, Z, nsim, bpri, Bpri, gpri, Gpri, burn, jump, graph1, graph2, meanlink = "log")

`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. |

`meanlink` |
represent the link function, logarithm or identity. |

The Bayesian Gamma regression allows the joint modeling of the mean and the shape of a gamma distributed variable, using a Bayesian estimation algorithm proposed by Cepeda-Cuervo (2001).

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

`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. |

`call` |
Call. |

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

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.

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]