EOO
Reputation
Next privilege 100 Rep.
Edit community wikis
 Mar2 awarded Popular Question Jul12 comment Performance of numerical optimization with triple integral Your solution is very clear and runs swiftly. Jul12 comment Performance of numerical optimization with triple integral Thanks for this. I've changed the question again so that it is framed around the non trivial problem, and not implying directly a solution related to a change in coordinates. I'm not very experienced with the forum, so I hope this structure makes more sense to everyone (I suppose that's why it was put on hold as off topic) Jul12 revised Performance of numerical optimization with triple integral Improved wording and phrasing of the actual question Jul11 revised Performance of numerical optimization with triple integral added 95 characters in body Jul11 comment Performance of numerical optimization with triple integral I've edited the question to allow for a non-trivial optimization (and have already included some of your suggestions). Any further advances to solve such a problem would be much appreciated Jul11 revised Performance of numerical optimization with triple integral Additional information Jul11 comment Performance of numerical optimization with triple integral If you call the function with any explicit argument, say q2[1,1] you get an error message. Do you know what that is? I think that something is going on with it, but NMaximize is not picking it up because in this simplified version of the problem there is only one feasible point... Jul11 comment Performance of numerical optimization with triple integral Thanks. Yes, I do realize the constraint makes the problem trivial, but I was just trying to make a small tractable version of my problem to ask the question. Having said that, your point is relevant - and I hadn't realized that using CDFs (actually I need to use SurvivalFunction because my actual distributions are not symmetric) significantly improves performance. Jul10 awarded Commentator Jul10 comment Performance of numerical optimization with triple integral Thanks. I'm trying to compile it but get an error. A couple of questions, just to check I understand what is going on: (1) there is a square bracket missing at the end of the definition of q2 (i.e. at the end of NIntegrate)...right? (2) What is jd? Jul10 revised Performance of numerical optimization with triple integral Typo Jul10 comment Speed of convergence for NIntegrate Here is a more detailed exposition of the problem I'm trying to solve. Thanks Jul10 asked Performance of numerical optimization with triple integral Jul10 accepted Speed of convergence for NIntegrate Jul10 comment Speed of convergence for NIntegrate Interesting approach. However it turns out that performance is indeed crucial because the problem I actually want to solve is a non-linear constrained optimisation problem over the limits of the integral. I tried transforming the integrand as you suggest (i.e. shifting the peak as a function of the truncation points) but this does not improve performance sufficiently. Your last suggestion is hence relevant. I don't know how to transform the problem to shperical coordinates, so I'll try -and probably open a new post asking about it. Thanks! Jul9 comment Speed of convergence for NIntegrate Thanks. Increasing working precision alone does get rid of the message but does not seem to improve the time significantly (at least once you embed it in a more complicated numerical optimisation routine). I'll try the two strategies you mention, and will def read the tutorial on integration strategies Jul9 asked Speed of convergence for NIntegrate Mar26 comment Empirical Cumulative Distribution Function I accepted kirma's answer because it came first and gives an exact solution. I however upvoted your answer because it is a useful approximation (and works directly with Mathematica 8). Thanks! Mar26 comment Empirical Cumulative Distribution Function @kirma Thanks. Very useful (works alright with Mathematica 8 as you suggest). Yes, I am dealing with empirical data, so I don't know exactly the data generating process and would hence prefer not to impose any parametric assumptions (and some of my other plots seem to fit less neatly normal distributions).