# Difficulty adding loo criterion to longitudinal truncated normal model

**URL:** https://discourse.mc-stan.org/t/difficulty-adding-loo-criterion-to-longitudinal-truncated-normal-model/41447
**Category:** Modeling
**Tags:** loo, specification, fitting-issues, brms
**Created:** [July 18, 2026, 10:13pm UTC](https://discourse.mc-stan.org/t/difficulty-adding-loo-criterion-to-longitudinal-truncated-normal-model/41447 "2026-07-18T22:13:11Z")
**Posts on this page:** 1
**Showing post:** 12

<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 23, 2026, 4:58pm UTC](https://discourse.mc-stan.org/t/difficulty-adding-loo-criterion-to-longitudinal-truncated-normal-model/41447/12 "2026-07-23T16:58:05Z")

</div>

That log\_lik matrix has +Inf values, and loo package silently passes them. +Inf values likely arise from the normalization term of the truncated likelihood (that is the integral of normal from 0 to 1) underflowing to 0, and then the untruncated likelihood values is divided by 0. It seems like truncated normal is not a good model, covariates have large values, or priors are to vague, so that the normal mean is smaller than 0 or larger than 1 and normal sd is so small, that the probability in the range from 0 to 1 is super small. Firstly, this is a problem with your model and secondly truncated likelihood computation in brms could be possibly made numerically better to not underflow or to provide warning in a case of underflow. Tagging @Florence_Bockting, who has recently worked on brms code related to this.

---

_[View the full topic](https://discourse.mc-stan.org/t/difficulty-adding-loo-criterion-to-longitudinal-truncated-normal-model/41447)._
