Displaying 1 result from an estimated 1 matches for "hazard1".
Did you mean:
hazard
2006 Nov 11
2
Bayesian question (problem using adapt)
...unction to perform integration in four dimensions (on my old version of R
I get an error message saying that I have applied a non-function, although
the function does work when I type kernel2(param0, theta0), or on the
newer version of R the computer crashes.
I have attached the following R code:
hazard1 <- function(x, param) {
if(min(x, param)<=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) *...