# Error with add\_criterion(..., "loo")

**URL:** <https://discourse.mc-stan.org/t/error-with-add-criterion-loo/20475>\
**Category:** brms\
**Created:** [January 27, 2021, 1:08pm UTC](https://discourse.mc-stan.org/t/error-with-add-criterion-loo/20475 "2021-01-27T13:08:32Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![mtenan](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mtenan/32/17734_2.png) [@mtenan](https://discourse.mc-stan.org/u/mtenan)\
**Post date:** [March 15, 2024, 8:38pm UTC](https://discourse.mc-stan.org/t/error-with-add-criterion-loo/20475/13 "2024-03-15T20:38:41Z")

</div>

Possibly related to the issue @avehtari and I are troubleshooting with loo?

See

> [@Add\_criterion with moment\_match=TRUE failing even when save\_pars(all=TRUE) was set during model fit](https://discourse.mc-stan.org/t/add-criterion-with-moment-match-true-failing-even-when-save-pars-all-true-was-set-during-model-fit/30956/15):
>
> Here is the reprex. Admittedly, I can only get it to cause the error on my Mac and not the Windows one, which has me completely baffled. (both machines still error with the original code) Are you able to replicate the error, @avehtari? library(brms) #make the data out1 \<- c(0.4259, 0.42855, 0.4193, 0.3835, 0.348, 0.5182, 0.52025, 0.44115, 0.4603, 0.44805, 0.3567857, 0.3799, 0.50925, 0.4768, 0.56815, 0.3948421, 0.42665, 0.37795, 0.36645, 0.34565, 0.7618947, 0.8046667, 0…

---

_[View the full topic](https://discourse.mc-stan.org/t/error-with-add-criterion-loo/20475)._
