Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O oct
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • oct
  • oct
  • Issues
  • #4
Closed
Open
Issue created Nov 12, 2020 by Symbolics@SymbolicsContributor

Implement incomplete-beta family of functions

The beta function is easily implemented in terms of gamma:

(defun beta (p q)
  "Compute beta with gamma function"
  (/ (* (NET.COMMON-LISP.OCT::gamma p) (NET.COMMON-LISP.OCT::gamma q))
     (NET.COMMON-LISP.OCT::gamma (+ p q))))

More useful however are the integral functions of beta. There are two BSD/MIT licensed version based on gamma, incb.c and an implementation in the CRISP genomic project. Both use Lentz's algorithm to evaluate the continued fraction, which OCT also uses for gamma.

It seems it should be possible to add the incomplete beta function in a similar manner. This isn't a type of programming I do often, and it's not entirely clear how to use the OCT lentz function to port the code from one of these implementations. Perhaps if someone could sketch out how a a 'proper' (from an OCT perspective) implementation of upper and lower incomplete beta might work I can run with it.

To use in a statistical context, we need:

  • incomplete-beta-lower
  • incomplete-beta-upper
  • beta
  • inverse-incomplete-beta (to compute quantiles)
Edited Nov 28, 2020 by Symbolics
Assignee
Assign to
Time tracking