stan-dev / stan-dev/math

BesselK continuous function

Open
#1,112 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

Description

In order to build robust count models based for example on SICHEL distribution, a continuous version of the BesselK function is needed (nu being real instead of int).

There is a tread here https://discourse.mc-stan.org/t/besselk-with-the-order-v-as-real-parameter/7417/4 but I thought to lounch a feature request since is quite a delicate math function (that is not working natively in log scale in the R version and therefore unstable)

For feature requests:

The code is present in R

https://stat.ethz.ch/R-manual/R-devel/library/base/html/Bessel.html

Expected Output

count ~ sichel(mu, sigma, nu)

Current Version:

v2.18.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked R Bessel documentation and the Discourse discussion about a real-valued BesselK order. Then locate the Stan Math entry point and relevant tests for BesselK, if present. Done means providing a continuous real-order BesselK suitable for the requested Sichel count-model use, including stable log-scale behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.