This tutorial develops the link-adjusted von Mises (LAvM) regression model in Stan. It begins with the ambiguity of ordinary circular regression, introduces the LAvM data model, and then moves from fixed effects to latent temporal structure and a wind-direction application. The presentation assumes familiarity with a basic Stan workflow and focuses on the circular model itself.

After completing the tutorial, you will be able to:

  • formulate an LAvM regression model through a real-valued linear predictor;
  • implement fixed-effect and latent-process versions of the model in Stan; and
  • interpret regression effects and concentration on the appropriate scales.

1 Preliminary

The model follows Ye, Van Niekerk, and Rue (2026), A Bayesian regression framework for circular models with INLA.

1.1 Von Mises distribution

The von Mises (vM) distribution is a standard model for a unimodal circular variable. Its probability density function is

\[ p_{\mathcal{VM}}\left(x \mid \mu, \kappa\right) = \frac{1}{2\pi \mathcal{I}_{0} \left(\kappa\right)} \exp \left\{ \kappa \cos \left( x - \mu \right) \right\}, \quad x \in \left[-\pi,\pi\right), \quad \kappa \in \left[0,\infty\right), \]

where \(\mu\) is the mean direction, \(\kappa\) is the concentration, and \(\mathcal I_0(\cdot)\) is the modified Bessel function of the first kind of order zero. Angles may equivalently be represented on \([0,2\pi)\). At \(\kappa=0\) the distribution is circular uniform; as \(\kappa\) increases, progressively more mass is placed near \(\mu\). Thus, \(\kappa\) behaves more like a precision than a variance parameter.

1.2 Inferential ambiguity

For a single circular variable, the signed angular residual can be represented uniquely on a chosen principal interval. Regression is more delicate because the mean direction varies by observation, for example \(\mu_i=g(\eta_i)\) for a real-valued predictor \(\eta_i\). Across observations, the unwrapped differences \(x_i-\mu_i\) can span \([-2\pi,2\pi)\), while the cosine term remains periodic. Distinct coefficient values can therefore give the same cosine values and, for some data configurations, equivalent modes of the likelihood.

This is an identifiability problem for the regression parameters rather than merely a choice of angular notation. Equivalent modes can lead different initial values to different solutions and make posterior exploration unnecessarily difficult. The repeated extrema below illustrate the source of the ambiguity.