The quadinf command in library pracma still fails when mu=-2.986731 with sigma=53415.18. While Maple gives me an estimate of 0.5001701024. ######################################## Maple: (for those who are interested) myf:=(mu,sigma)-> evalf(Int(exp(-(x-mu)^2/2/sigma^2)/sigma/sqrt(2*Pi)/(1+exp(-x)), x=-infinity..infinity)); myf(-2.986731, 53415.18 ); 0.5001701024 ########################################
These 'mu's and 'sigma's are now random starting points I generated for an optimization problem like I have mentioned. I should really investigate the behavior of this function before I ask R doing the integration. As I have mentioned that I had already realized the integral is between 0 and 1. And I have had a look at the contour plots of different mu and sigma. I am going to 'restrict' mu and sigma to certain (small) values, and still get the integral to produce a value between 0 and 1. All of your help is much appreciated. casper ----- ################################################### PhD candidate in Statistics School of Mathematics, Statistics and Actuarial Science, University of Kent ################################################### -- View this message in context: http://r.789695.n4.nabble.com/R-numerical-integration-tp4500095p4503766.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.