baptiste auguie <baptiste.auguie <at> googlemail.com> writes: > > Thanks, adaptIntegrate() seems perfectly suited, I'll just need to > figure a transformation rule for the infinite limit. The suggestion of > x->1/x does not seem to work here because it also transforms 0 into > -infinity. I think exp(pi* sinh(x)) could be a better choice, > according to Numerical Recipes.
Yes, that's one way. But you can also split the integral in two parts, one from 0 to 1 and then from 1 to Inf. The first one is a finite hypercube and the second can be transformed with x --> 1/x into [0, 1]. I usually prefer the second approach for higher-dimensional applications as the Jacobian appears to be simpler. In the literature you will find discussions on how far out the finite hypercube should reach for lowering the absolute error. Hans Werner > Thanks, > > baptiste > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.