Re: [R] multivariate integral with ADAPT when the parameter is close to boundary

2008-10-19 Thread Muhtar Osman
Thanks so much for the comments. Of course, integrating "dbeta(theta[1],0.005,0.005)*dbeta(theta[2],0.005,0.005)" over the whole range is not something I am really interested in. I am just concerned about the results I got for other integrands with extreme priors using ADAPT function. It is true th

Re: [R] multivariate integral with ADAPT when the parameter is close to boundary

2008-10-18 Thread Prof Brian Ripley
1) That integrand is a product, so you can do this a product of integrals, and do those analytically. 2) Do you have any idea how extreme beta(0.005, 0.005) is? See the comment in the help for integrate: Like all numerical integration routines, these evaluate the function on a fini

[R] multivariate integral with ADAPT when the parameter is close to boundary

2008-10-18 Thread Muhtar Osman
Dear All, There is one problem I encountered when I used ADAPT to compute some 2-D integral w.r.t beta density. For example, when I try to run the following comments: fun2<-function(theta){return(dbeta(theta[1],0.005,0.005)*dbeta(theta[2],0.005,0.005))} int.fun2<-adapt(ndim=2,lo = c(0,0), up = c