There's a large literature on circular statistics.
We'll finally have a working version of unit vector
parameters in Stan 2.10 (out soon). And I wrote up a new
chapter for the manual (warning---I had to learn as I
went, never having done circular stats). I'm attaching
it prior to release (comments welcome, as always).
Your diagnosis is accurate --- the sampler can't move
between -pi and pi if you treat it as a line. Stan uses
an auxiliary variable parameterization somewhat like yours
(but unconstrained), and a unit normal regulaization
described in the attached chapter; there aren't any free
parameters in that, though --- you just need to fix the
scale.
If you did this
for (n in 1:N)
y[n] ~ normal(mu[n], sigma);
and sigma is an N-vector, then it's equivalent to this
for (n in 1:N)
for (m in 1:N)
y[n] ~ normal(mu[n], sigma[m]);
which is not what you want to do. It artificially multiplies
data size by N and ties all the parameters sigma[n] together.
- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
stan-users+...@googlegroups.com.
> To post to this group, send email to
stan-...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
> <circular example.txt>