Skip to content
Prev 157615 / 398506 Next

R's integrate function

Hello,

I am trying to use R's integrate function to calculate the following
integral for z=423:

integrate(function(y,z){
sapply(y, function(y,z){
integrate(function(x,z)
1/x*dbeta(0.01,x/(0.005/1.005),(1-x)/(0.005/1.005))*dbeta(y,x/(0.005/1.005),(1-x)/(0.005/1.005))*(1-y)^z,0,1,423)$value
})
},0,1,423)$value

but I receive an error message saying that the maximum number of
subdivisions is reached. If I choose a smaller z it works fine. Does
anyone know what the problem is?

Thank you very much in advance,
Tiffy