[R] R's integrate function
Susanne Pfeifer
tiffy at tiffy.it
Tue Sep 30 18:17:09 CEST 2008
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
More information about the R-help
mailing list