[R] Numerical Integration Problems

Christos Argyropoulos argchris at hotmail.com
Thu Jan 8 15:11:24 CET 2009


 
Hi, 
You may want to try the double exponential transformation on the numerator and the denominator on this one.
The method is described in detail here:
http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.prims/1145474600
 
 
 
If you want to give it a shot outside R there are a couple of C/C++ implementations out there:
http://www.codeproject.com/KB/recipes/FastNumericalIntegration.aspx
http://www.crbond.com/download/deint.c
 
I have used the second one in a project of mine that is similar to the one you describe (calculation of posterior expectations in Bayesian inference), and I can say that it works reasonably well.
 
As a side note, the DE method is one (actually the default) of the numerical integration methods implemented by Mathematica's NIntegrate function. It would be nice if someone found the time to augment R's integration facilities with this (and possibly other) numerical integration methods.
 
Christos Argyropoulos
University of Pittsburgh Medical Center 
_________________________________________________________________

s. It's easy!

aspx&mkt=en-us



More information about the R-help mailing list