Displaying 1 result from an estimated 1 matches for "chazard1".
2006 Nov 11
2
Bayesian question (problem using adapt)
...;=0) {return("function undefined")}
return(param[1]*x^(param[2] -1))
}
gm <- function( theta, param) {
dgamma(param[1], shape = .1, scale = .1) *
dgamma(param[2], shape = .1, scale = .1) *
dgamma(theta[1], shape = .1, scale = .1) *
dgamma(theta[2], shape = .1, scale = .1)
}
chazard1 <-function(x, param) {
if(min(x, param) <=0) {return("function undefined")}
param[1]*x^param[2] / param[2]
}
hazard2 <-function(x, theta, param) {
if(min(x, theta, param) <= 0) {return("function undefined")}
ratio = 1/(theta[1]*exp(-chazard1(x, param)) +
theta...