# Student t likelihood

**URL:** <https://discourse.mc-stan.org/t/student-t-likelihood/5921>\
**Category:** rstanarm\
**Created:** [October 8, 2018, 10:37am UTC](https://discourse.mc-stan.org/t/student-t-likelihood/5921 "2018-10-08T10:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nels](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nels/32/3304_2.png) [@nels](https://discourse.mc-stan.org/u/nels)\
**Post date:** [October 8, 2018, 10:37am UTC](https://discourse.mc-stan.org/t/student-t-likelihood/5921/1 "2018-10-08T10:37:51Z")

</div>

hi,

I’m new to RStan, rstanarm & R but have some experience modelling with PyMC3.  
I would like to translate a model for “robust regression” which uses Student t for the likelihood.  
In the spirit of [here](https://pymc3-testing.readthedocs.io/en/rtd-docs/notebooks/GLM-robust.html)

I’m able to build such a model when RStan directly but would prefer using rstanarm.

I have found a Feature issue from late 2015 regarding Student t likelihood [here](https://github.com/stan-dev/rstanarm/issues/35) and a pull request from 2016 [here](https://github.com/stan-dev/rstanarm/pull/62/commits/66772a75b37e350c3fec9571bfa659fa6486f911) that implements code for t\_family.  
However this is not available in 2.17.4

Are there plans to implement a Student T family to be used for the likelihood in rstanarm?

Thanks

- Operating System: Linux x86\_64
- rstanarm Version: rstanarm\_2.17.4

---

<div class="post-metadata">

**Author:** ![bgoodri](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bgoodri/32/4451_2.png) [@bgoodri](https://discourse.mc-stan.org/u/bgoodri)\
**Post date:** [October 8, 2018, 1:00pm UTC](https://discourse.mc-stan.org/t/student-t-likelihood/5921/2 "2018-10-08T13:00:46Z")

</div>

The rstanarm R package does not have a model with a student t likelihood. The brms R package does, I think.

---

<div class="post-metadata">

**Author:** ![paul.buerkner](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/paul.buerkner/32/3303_2.png) [@paul.buerkner](https://discourse.mc-stan.org/u/paul.buerkner)\
**Post date:** [October 8, 2018, 1:01pm UTC](https://discourse.mc-stan.org/t/student-t-likelihood/5921/3 "2018-10-08T13:01:35Z")

</div>

Yes, brms can handle this via family `student()`.

---

<div class="post-metadata">

**Author:** ![nels](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nels/32/3304_2.png) [@nels](https://discourse.mc-stan.org/u/nels)\
**Post date:** [October 11, 2018, 2:39am UTC](https://discourse.mc-stan.org/t/student-t-likelihood/5921/4 "2018-10-11T02:39:57Z")

</div>

Thank you, I will investigate brms
