Hi Benjamin, I haven’t followed up on this, but I put what I had implemented back when I asked this question here https://github.com/arzwa/IncBetaDer. The beta_inc_grad code is here, I hope it can be useful. I’m not at all a numerical algorithms guy, so it might not be very good or correct currently, although I do think I had some tests. (Needless to say, I haven’t prepared this code for release or so, so comments etc. should be read as notes to myself).