# Binomial\_logit\_glm not available?

**URL:** <https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362>\
**Category:** Developers\
**Created:** [July 28, 2022, 8:26am UTC](https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362 "2022-07-28T08:26:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wds15](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wds15/32/908_2.png) [@wds15](https://discourse.mc-stan.org/u/wds15)\
**Post date:** [July 28, 2022, 8:26am UTC](https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362/1 "2022-07-28T08:26:09Z")

</div>

Hi!

I just realise that we do not have a `binomial_logit_glm` function in the language. There is only a Bernoulli version of it or a categorical logit… but how come there is no `binomial_ logit` glm function (which are super fast)?

Should that be worked on … so that an issue is needed?

Best,  
Sebastian

---

<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:** [July 30, 2022, 10:13am UTC](https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362/2 "2022-07-30T10:13:48Z")

</div>

I added binomial to an existing issue asking for more glm’s [more glm functions · Issue #1964 · stan-dev/math · GitHub](https://github.com/stan-dev/math/issues/1964)

---

<div class="post-metadata">

**Author:** ![sonicking](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sonicking](https://discourse.mc-stan.org/u/sonicking)\
**Post date:** [July 30, 2022, 4:13pm UTC](https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362/3 "2022-07-30T16:13:32Z")

</div>

Is it possible to relax the requirement of integers for inference-only purpose?

---

<div class="post-metadata">

**Author:** ![Bob\_Carpenter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bob_carpenter/32/9230_2.png) [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Post date:** [August 1, 2022, 4:45pm UTC](https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362/4 "2022-08-01T16:45:17Z")

</div>

> [@sonicking](#):
>
> Is it possible to relax the requirement of integers for inference-only purpose?

Is the motivation fractional counts from some kind of pre-processing?

If so, I’d suggest writing a different function rather than overloading `binomial`, which is, strictly speaking, only defined with support over integers. A generalized real variate version would presumably take `p(y) propto theta^y * (1 - theta)^(N - y)`. What’s the normalizing term?

---

<div class="post-metadata">

**Author:** ![sonicking](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sonicking](https://discourse.mc-stan.org/u/sonicking)\
**Post date:** [August 3, 2022, 11:31am UTC](https://discourse.mc-stan.org/t/binomial-logit-glm-not-available/28362/5 "2022-08-03T11:31:49Z")

</div>

I understand your recommendation. Thank you.
