# Circular examples?

**URL:** <https://discourse.mc-stan.org/t/circular-examples/2798>\
**Category:** Modeling\
**Created:** [December 18, 2017, 7:46pm UTC](https://discourse.mc-stan.org/t/circular-examples/2798 "2017-12-18T19:46:06Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mike-lawrence](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mike-lawrence/32/59_2.png) [@mike-lawrence](https://discourse.mc-stan.org/u/mike-lawrence)\
**Post date:** [January 12, 2018, 3:16pm UTC](https://discourse.mc-stan.org/t/circular-examples/2798/3 "2018-01-12T15:16:24Z")

</div>

Ah, I think I understand the unit\_vector variable type now! Key to my revelation was realizing that I think it’s intended as a intermediate/helper variable and that you need to transform it to get at quantities of interest. For example, if interested in an angle on a circle, you’d define a `unit_vector[2] angle_helper` parameter and then compute the angle as a transformed variable: `real angle = atan2(angle_helper[1],angle_helper[2]);`

Full example is [here](http://discourse.mc-stan.org/t/divergences-false-alarm-in-model-using-unit-vector/2962).

---

_[View the full topic](https://discourse.mc-stan.org/t/circular-examples/2798)._
