stan-dev / stan-dev/math

Add Geometric distribution

Open
#3,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Add support for the geometric distribution and the corresponding GLM. It's a special case of the negative binomial distribution (when n=1 in the usual parametrization) which is already supported, so I believe it should be relatively straightforward to implement. Arguably, geometric distribution is not some exotic distribution, so users may expect to have that available.

The expected advantages of having this are:

  • Prettier/better readable stan code
  • Possibly some performance gain compared to using the NB distribution

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 by reviewing the existing negative binomial distribution and its GLM support, since the issue identifies geometric as its n=1 special case. Determine the corresponding distribution and GLM interfaces and add coverage for both; done means geometric distribution support is available with readable Stan code and any expected performance benefit is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.