# Case study: Extreme value analysis and user defined probability functions in Stan

**URL:** <https://discourse.mc-stan.org/t/case-study-extreme-value-analysis-and-user-defined-probability-functions-in-stan/2464>\
**Category:** Modeling\
**Created:** [November 8, 2017, 8:01pm UTC](https://discourse.mc-stan.org/t/case-study-extreme-value-analysis-and-user-defined-probability-functions-in-stan/2464 "2017-11-08T20:01:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![avehtari](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/avehtari/32/5935_2.png) [@avehtari](https://discourse.mc-stan.org/u/avehtari)\
**Post date:** [November 9, 2017, 7:31pm UTC](https://discourse.mc-stan.org/t/case-study-extreme-value-analysis-and-user-defined-probability-functions-in-stan/2464/2 "2017-11-09T19:31:44Z")

</div>

I made an update of the notebook. I made several miscellaneous improvements. @bgoodri gave a great suggestion to add tests, which was very easy using expose\_stan\_functions. Update in github [https://github.com/avehtari/BDA\_R\_demos/blob/master/demos\_rstan/](https://github.com/avehtari/BDA_R_demos/blob/master/demos_rstan/) and here’s the pdf, too  
[geomagnetic.pdf](https://canada1.discourse-cdn.com/flex030/uploads/mc_stan/original/2X/2/21b34ea5fcc738f50987090bff9afbfddb9de535.pdf) (437.0 KB)

Would this be ok as a case study?

---

_[View the full topic](https://discourse.mc-stan.org/t/case-study-extreme-value-analysis-and-user-defined-probability-functions-in-stan/2464)._
