Skip to content

Commit b615675

Browse files
authored
Merge pull request #125 from stan-dev/bugfix/von-mises-kappa-0
Document what happens to the von Mises distribution for kappa = 0
2 parents 29f1b84 + 4031421 commit b615675

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/functions-reference/circular_distributions.Rmd

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ interval $(c, c + 2\pi)$ of length $2 \pi$, because \[ \int_{c}^{c +
2121
2\pi} \text{VonMises}(y|\mu,\kappa) dy = 1. \] Similarly, if $\mu$ is
2222
a parameter, it will typically be restricted to the same range as $y$.
2323

24-
A von Mises distribution with its $2 \pi$ interval of support centered
25-
around its location $\mu$ will have a single mode at $\mu$; for
26-
example, restricting $y$ to $(-\pi,\pi)$ and taking $\mu = 0$ leads to
27-
a single local optimum at the model $\mu$. If the location $\mu$ is
24+
If $\kappa > 0$, a von Mises distribution with its $2 \pi$ interval of
25+
support centered around its location $\mu$ will have a single mode at $\mu$;
26+
for example, restricting $y$ to $(-\pi,\pi)$ and taking $\mu = 0$ leads to
27+
a single local optimum at the mode $\mu$. If the location $\mu$ is
2828
not in the center of the support, the density is circularly translated
2929
and there will be a second local maximum at the boundary furthest from
3030
the mode. Ideally, the parameterization and support will be set up so
3131
that the bulk of the probability mass is in a continuous interval
3232
around the mean $\mu$.
3333

34+
For $\kappa = 0$, the Von Mises distribution corresponds to the
35+
circular uniform distribution with density $1 / (2 \pi)$ (independently
36+
of the values of $y$ or $\mu$).
37+
3438
### Sampling Statement
3539

3640
`y ~ ` **`von_mises`**`(mu, kappa)`
@@ -63,7 +67,7 @@ blocks. For a description of argument and return types, see section
6367
### Numerical Stability
6468

6569
Evaluating the Von Mises distribution for $\kappa > 100$ is
66-
numerically unstable in the current implementation. Nathanael I.\
70+
numerically unstable in the current implementation. Nathanael I.
6771
Lichti suggested the following workaround on the Stan users group,
6872
based on the fact that as $\kappa \rightarrow \infty$, \[
6973
\text{VonMises}(y|\mu,\kappa) \rightarrow \text{Normal}(\mu, \sqrt{1 /

0 commit comments

Comments
 (0)