Depending on how much precision you need, integration can be approximated using +/ (or, d._1 but I guess because that's not general enough, d. has been removed from recent versions of J and been replaced by deriv_jcalculus_ -- see https://code.jsoftware.com/wiki/Vocabulary/ddot).
But I don't read R well enough to read that expression and translate it into J. I can point you at a J implementation of a beta function -- https://code.jsoftware.com/wiki/Essays/Beta_Function (beta=: ] %@* [ !&<: +) but I do not know how closely that's related to R's beta distribution.... There's also the incomplete beta mentioned at https://www.jsoftware.com/papers/jhyper.pdf Looking at the wikipedia writeup at https://en.wikipedia.org/wiki/Beta_distribution, I see an expression for the probability distribution function and for the cumulative distribution function for beta distributions ... and I would guess that maybe what you are looking for is a mechanism to compute the CDF from the PDF? (But, since calculus often involves infinities, integration often devolves into symbol lookups and/or numeric approximations...) I don't know if any of this helps, though.. -- Raul On Tue, Dec 29, 2020 at 10:51 AM Thomas Bulka <[email protected]> wrote: > > Hello everyone, > > I’m using the winter holidays to polish my knowledge in statistics, > which has gotten pretty rusty lately. Until now, I did some quick > calculations in R, but I’d like to switch to J to improve my knowledge > here, too. > > However, I’m not quite sure on the current state of the statistical > tools that J already provides. I have, yet, mostly dabbled with the J > primitives, on which the documentation is excellent!, but I do not have > that much experience with the external libraries/packages and, even > worse, I’m not even sure where to look for the right documentation. > > For example: In R I can easily calculate the integral between two points > of a beta distribution like this: > > integrate(function(p) dbeta(p, 10, 111), 0.40, 0.55) > > I’d like to do so in J, but I’m not sure, where to start here. Is > there any documentation on doing these kind of things in J which I did > not find? > > Kind regards, > > Thomas > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
