stan-dev / stan-dev/docs

Von mises distribution support

Open
#172 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
43
Forks
133
Avg merge
11h 32m
Merged PRs (30d)
4

Description

Summary:

I went to rewrite the docs for von_mises to define its support as (-pi, pi) and add a note that things outside that range are handled periodically.

Then I realized von_mises_rng generates random numbers on the range (mod(mu, 2 pi) - pi, mod(mu, 2 pi) + pi), which doesn't really make that much sense even if you allow the support to move around.

I'd assume either (-pi, pi) or (mu - pi, mu + pi) would have been the two obvious choices.

The support of the rng just seems wrong. Even if we allow von_mises_lpdf to accept numbers out of its support, I think we should fix the rng to work only on (-pi, pi). This will also lead to changes in the math library if we decide to do this. Just putting the discussion here.

https://mc-stan.org/docs/2_22/functions-reference/von-mises-distribution.html

@bob-carpenter @pgree

Current Version:

v2.18.0

Contributor guide

No contributing guide indexed for this repository

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 von Mises distribution reference page and the issue's discussion of von_mises_rng and von_mises_lpdf. Resolve whether the support should be (-pi, pi) or shifted by mu, then update the documentation and account for the stated math-library changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Bug
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.