mukernel: the probability of a beta parameter from the probability...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/mukernel.R

Description

evaluate the probability of a beta parameter from the probability density function defined by old parameters

Usage

1
mukernel(X, Z, Y, betas.n, betas.v, gammas.v, bpri, Bpri)

Arguments

X

object of class matrix, with the variables for modelling the mean

Z

object of class matrix, with the variables for modelling the variance

Y

object of class matrix, with the dependent variable

betas.n

a vector with the beta parameter, new parameter, to evaluate in the old p.d.f

betas.v

a vector with the beta that define the old p.d.f

gammas.v

a vector with the gamma that define the old p.d.f

bpri

a vector with the initial values of gamma

Bpri

a matrix with the initial values of the variance of gamma

Details

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

value

a matrix with the probability for the beta parameter from the probability density function defined by old parameters

Author(s)

Daniel Jaimes dajaimesc@unal.edu.co, Margarita Marin mmarinj@unal.edu.co, Javier Rojas jarojasag@unal.edu.co, Hugo Andres Gutierrez Rojas hugogutierrez@usantotomas.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

References

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/MODELAGEMDAVARIABILIDADE.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.

Examples

 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
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)
betas.n=c(0,0,0,0)
betas.v=c(0,0,0,0)
gammas.v=c(0,0)
bpri=c(0,0,0,0)
Bpri=diag(100,nrow=ncol(X),ncol=ncol(X))

denbeta <- mukernel(X,Z,Y,betas.n,betas.v,gammas.v,bpri,Bpri)
denbeta

Bayesianbetareg documentation built on May 30, 2017, 2:35 a.m.