# \#loo

**URL:** https://discourse.mc-stan.org/tag/loo/33.md?match_all_tags=true&page=1&tags%5B%5D=loo

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

**Page:** 2

---

## [Diagnostics for Mixture IS leave-one-out cross-validation?](https://discourse.mc-stan.org/t/diagnostics-for-mixture-is-leave-one-out-cross-validation/39864)

<div class="topic-metadata">

**Author:** [@ruarai](https://discourse.mc-stan.org/u/ruarai)\
**Replies:** 1\
**Last updated:** [July 21, 2025, 6:27pm UTC](https://discourse.mc-stan.org/t/diagnostics-for-mixture-is-leave-one-out-cross-validation/39864 "2025-07-21T18:27:14Z")

</div>

Hi all, I’m currently trying to implement some model comparison metrics for a high-dimensional model. I don’t have a MWE to share, but there’s a writeup of a previous implementation of the model here: Timescales of inf…

---

## [Model Comparison when high Pareto k?](https://discourse.mc-stan.org/t/model-comparison-when-high-pareto-k/39444)

<div class="topic-metadata">

**Author:** [@Sheeta27](https://discourse.mc-stan.org/u/Sheeta27)\
**Replies:** 6\
**Last updated:** [July 21, 2025, 1:50pm UTC](https://discourse.mc-stan.org/t/model-comparison-when-high-pareto-k/39444 "2025-07-21T13:50:46Z")

</div>

Hi everyone! I’m modeling some data thanks to a joint model between survival and longitudinal data. Those longitudinal data have a hierarchical structure, with two random effects levels : each patients have a least one …

---

## [Loo and loglikelihood calculation for bivariate poisson](https://discourse.mc-stan.org/t/loo-and-loglikelihood-calculation-for-bivariate-poisson/28648)

<div class="topic-metadata">

**Author:** [@fabio](https://discourse.mc-stan.org/u/fabio)\
**Replies:** 15\
**Last updated:** [July 1, 2025, 3:45pm UTC](https://discourse.mc-stan.org/t/loo-and-loglikelihood-calculation-for-bivariate-poisson/28648 "2025-07-01T15:45:14Z")

</div>

Given a standard model like y\_i \\sim \\mathcal{Poisson}\\left(\\lambda\\right), then the calculation of the log-likelihood function for using it with the loo package is straightforward: vector\[N\] log\_lik; for (n in 1:N) { …

---

## [Loo\_compare in the presence of high pareto-k](https://discourse.mc-stan.org/t/loo-compare-in-the-presence-of-high-pareto-k/35521)

<div class="topic-metadata">

**Author:** [@gregd](https://discourse.mc-stan.org/u/gregd)\
**Replies:** 6\
**Last updated:** [June 29, 2025, 8:44am UTC](https://discourse.mc-stan.org/t/loo-compare-in-the-presence-of-high-pareto-k/35521 "2025-06-29T08:44:53Z")

</div>

Proposal re comparing models despite some high pareto-k values. We may be dealing with large datasets and complex models for which there is no simple way to eliminate high pareto-k values. In my work, a typical run-time…

---

## [LOO-CV problem](https://discourse.mc-stan.org/t/loo-cv-problem/39761)

<div class="topic-metadata">

**Author:** [@lg01](https://discourse.mc-stan.org/u/lg01)\
**Replies:** 2\
**Last updated:** [June 23, 2025, 7:19am UTC](https://discourse.mc-stan.org/t/loo-cv-problem/39761 "2025-06-23T07:19:06Z")

</div>

I am comparing three different models using LOO. For one of these models, I am a bit uncertain about whether the results can be trusted, given that there are some problematic values. I tried dropping these observations, …

---

## [Error: 'r\_eff' must have one value per observation](https://discourse.mc-stan.org/t/error-r-eff-must-have-one-value-per-observation/39679)

<div class="topic-metadata">

**Author:** [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Replies:** 2\
**Last updated:** [June 10, 2025, 8:13am UTC](https://discourse.mc-stan.org/t/error-r-eff-must-have-one-value-per-observation/39679 "2025-06-10T08:13:43Z")

</div>

I’m fitting this bernoulli logit model with two varying-effect terms and fairly weak data, drawing 1,000,000 posterior samples in order to eliminate Monte Carlo SE from elpd\_loo. But when trying to calculate the loo obj…

---

## [Help with Bayesian Model Comparison for Hierarchical Models](https://discourse.mc-stan.org/t/help-with-bayesian-model-comparison-for-hierarchical-models/39562)

<div class="topic-metadata">

**Author:** [@als\_che](https://discourse.mc-stan.org/u/als_che)\
**Replies:** 2\
**Last updated:** [June 10, 2025, 9:41am UTC](https://discourse.mc-stan.org/t/help-with-bayesian-model-comparison-for-hierarchical-models/39562 "2025-06-10T09:41:41Z")

</div>

Hi everyone, I’m struggling to compute meaningful Bayes Factors or model comparison metrics for a hierarchical model, possibly because my background is more frequentist. Here’s my problem: I have repeated measurements…

---

## [Summing LOOIC across models that share similar structure for different response variables](https://discourse.mc-stan.org/t/summing-looic-across-models-that-share-similar-structure-for-different-response-variables/39644)

<div class="topic-metadata">

**Author:** [@Jessica\_ZM](https://discourse.mc-stan.org/u/Jessica_ZM)\
**Replies:** 5\
**Last updated:** [June 6, 2025, 6:19am UTC](https://discourse.mc-stan.org/t/summing-looic-across-models-that-share-similar-structure-for-different-response-variables/39644 "2025-06-06T06:19:03Z")

</div>

Hi! I have a question on model selection across same model structures across different response variables. Say I have 3 response variables. Each response variable has different sample sizes. However, for each response v…

---

## [Two Conceptual Questions Regarding Bayesian Model Averaging](https://discourse.mc-stan.org/t/two-conceptual-questions-regarding-bayesian-model-averaging/39549)

<div class="topic-metadata">

**Author:** [@RCFischer](https://discourse.mc-stan.org/u/RCFischer)\
**Replies:** 2\
**Last updated:** [June 5, 2025, 6:59am UTC](https://discourse.mc-stan.org/t/two-conceptual-questions-regarding-bayesian-model-averaging/39549 "2025-06-05T06:59:20Z")

</div>

Hi everyone, I’m currently working on my first paper using data from European energy firms. The core research question is: To what extent has it been profitable for energy companies to invest in renewable energy? On…

---

## [\[PUBLICATION\] New Psychometrika Paper: Diagnosing and Improving Estimation in Growth Mixture Models – Paper with Full Stan Code](https://discourse.mc-stan.org/t/publication-new-psychometrika-paper-diagnosing-and-improving-estimation-in-growth-mixture-models-paper-with-full-stan-code/39624)

<div class="topic-metadata">

**Author:** [@Doria](https://discourse.mc-stan.org/u/Doria)\
**Replies:** 0\
**Last updated:** [June 1, 2025, 3:16pm UTC](https://discourse.mc-stan.org/t/publication-new-psychometrika-paper-diagnosing-and-improving-estimation-in-growth-mixture-models-paper-with-full-stan-code/39624 "2025-06-01T15:16:57Z")

</div>

Hi Stan folks, I want to share a recent Psychometrika paper that might be useful for those working on growth mixture models (GMMs) or interested in diagnosing and addressing estimation issues in Stan: “Bayesian Identif…

---

## [Meta-regression in Brms with skew and outliers](https://discourse.mc-stan.org/t/meta-regression-in-brms-with-skew-and-outliers/33082)

<div class="topic-metadata">

**Author:** [@LukianAdams](https://discourse.mc-stan.org/u/LukianAdams)\
**Replies:** 1\
**Last updated:** [May 30, 2025, 3:23pm UTC](https://discourse.mc-stan.org/t/meta-regression-in-brms-with-skew-and-outliers/33082 "2025-05-30T15:23:31Z")

</div>

Hi all, I am trying to run the following meta-regression model in Brms, but have run into a problem selecting an appropriate error distribution. meta\_fit\_species \<- brm(LRR| se(LRR\_SE) ~ SpeciesNames\*Day…

---

## [High Pareto-k values for an cdm model with real datasets](https://discourse.mc-stan.org/t/high-pareto-k-values-for-an-cdm-model-with-real-datasets/39585)

<div class="topic-metadata">

**Author:** [@summer](https://discourse.mc-stan.org/u/summer)\
**Replies:** 0\
**Last updated:** [May 28, 2025, 7:32am UTC](https://discourse.mc-stan.org/t/high-pareto-k-values-for-an-cdm-model-with-real-datasets/39585 "2025-05-28T07:32:21Z")

</div>

I am a student and am using the nimble package to estimate the cognitive diagnostic model. Only one attribute is measured for each question. The model I use is the summing cognitive diagnosis model. However, since only o…

---

## [Loo\_subsample slower than loo?](https://discourse.mc-stan.org/t/loo-subsample-slower-than-loo/39556)

<div class="topic-metadata">

**Author:** [@ruben](https://discourse.mc-stan.org/u/ruben)\
**Replies:** 14\
**Last updated:** [May 27, 2025, 8:45am UTC](https://discourse.mc-stan.org/t/loo-subsample-slower-than-loo/39556 "2025-05-27T08:45:50Z")

</div>

I am fitting several large models and I would like to compare fit for two of them to see whether a simplifying assumption (substituting (0 + item\_type|id) with (1|id) is defensible. I’m currently only working with a subs…

---

## [Moment\_match silently ignored when using multiple cores in loo\_moment\_match](https://discourse.mc-stan.org/t/moment-match-silently-ignored-when-using-multiple-cores-in-loo-moment-match/39526)

<div class="topic-metadata">

**Author:** [@Rick\_RS95](https://discourse.mc-stan.org/u/Rick_RS95)\
**Replies:** 10\
**Last updated:** [May 22, 2025, 11:16am UTC](https://discourse.mc-stan.org/t/moment-match-silently-ignored-when-using-multiple-cores-in-loo-moment-match/39526 "2025-05-22T11:16:25Z")

</div>

Hello! This is my first post in the Stan forums, so I’m not sure if I’ve chosen the most appropriate tags to categorize the issue—apologies if not! I’d like to share an issue I’ve encountered with the moment\_match metho…

---

## [Loo Min. n\_eff](https://discourse.mc-stan.org/t/loo-min-n-eff/39529)

<div class="topic-metadata">

**Author:** [@Sheeta27](https://discourse.mc-stan.org/u/Sheeta27)\
**Replies:** 4\
**Last updated:** [May 19, 2025, 9:16pm UTC](https://discourse.mc-stan.org/t/loo-min-n-eff/39529 "2025-05-19T21:16:04Z")

</div>

Hi everyone! I have a simple question, what does “Min. n\_eff” means in the pareto\_k\_table please? For example: Thank you! -S

---

## [LOO-CV for joint models](https://discourse.mc-stan.org/t/loo-cv-for-joint-models/39454)

<div class="topic-metadata">

**Author:** [@tjmckinley](https://discourse.mc-stan.org/u/tjmckinley)\
**Replies:** 8\
**Last updated:** [May 12, 2025, 7:43am UTC](https://discourse.mc-stan.org/t/loo-cv-for-joint-models/39454 "2025-05-12T07:43:23Z")

</div>

Hi all, I have been playing around with a joint model for two variables (Y, D), where the likelihood function can be written in the form f(Y | D)P(D), where Y is say Gaussian and D is say Bernoulli. I would like to use …

---

## [Different WAIC for the exact same model](https://discourse.mc-stan.org/t/different-waic-for-the-exact-same-model/36739)

<div class="topic-metadata">

**Author:** [@Sheeta27](https://discourse.mc-stan.org/u/Sheeta27)\
**Replies:** 11\
**Last updated:** [May 10, 2025, 9:02am UTC](https://discourse.mc-stan.org/t/different-waic-for-the-exact-same-model/36739 "2025-05-10T09:02:20Z")

</div>

Hi everyone! When I’m running the exact same model several times (via a loop with the same seed), I obtain different WAIC which seems very strange. I would have expected to obtain the same WAIC every times. To obtain t…

---

## [R2 for Bayesian models v. Nakagawa delta method](https://discourse.mc-stan.org/t/r2-for-bayesian-models-v-nakagawa-delta-method/29112)

<div class="topic-metadata">

**Author:** [@RobertoCerina](https://discourse.mc-stan.org/u/RobertoCerina)\
**Replies:** 3\
**Last updated:** [April 23, 2025, 7:58am UTC](https://discourse.mc-stan.org/t/r2-for-bayesian-models-v-nakagawa-delta-method/29112 "2025-04-23T07:58:04Z")

</div>

I am looking to sensibly partition the variance from a mixed-effects logit model fit via stan. I understand typical Bayesian R^2 (Bayesian R2 and LOO-R2) is: R^2 = \\frac{\\sigma^2\_{\\mu}}{\\sigma^2\_{\\mu} + \\sigma^2\_{\\eps…

---

## [Issue with bridgesampling::bridge\_sampler()](https://discourse.mc-stan.org/t/issue-with-bridgesampling-bridge-sampler/39207)

<div class="topic-metadata">

**Author:** [@Tommaso11397](https://discourse.mc-stan.org/u/Tommaso11397)\
**Replies:** 1\
**Last updated:** [April 3, 2025, 2:07pm UTC](https://discourse.mc-stan.org/t/issue-with-bridgesampling-bridge-sampler/39207 "2025-04-03T14:07:18Z")

</div>

Hi, I am having issues with the function: brs.reference \<- bridgesampling::bridge\_sampler(stanfit\_model = stan.fit) Where stan.fit is a stan fit class object obtained by running my model using the stan() function. The …

---

## [Loo for hierarchical model with trial-by-trial dependencies](https://discourse.mc-stan.org/t/loo-for-hierarchical-model-with-trial-by-trial-dependencies/39159)

<div class="topic-metadata">

**Author:** [@Ido\_Ben\_Artzi](https://discourse.mc-stan.org/u/Ido_Ben_Artzi)\
**Replies:** 8\
**Last updated:** [April 2, 2025, 8:01am UTC](https://discourse.mc-stan.org/t/loo-for-hierarchical-model-with-trial-by-trial-dependencies/39159 "2025-04-02T08:01:32Z")

</div>

Hi everyone, I’m using Stan to fit a reinforcement learning (RL) model to behavioral data, where each participant is modeled hierarchically with subject-level parameters. I want to compare different models based on thei…

---

## [Stepwise AIC or equivalent for interaction terms in brms](https://discourse.mc-stan.org/t/stepwise-aic-or-equivalent-for-interaction-terms-in-brms/39192)

<div class="topic-metadata">

**Author:** [@sarahsaxtonstrassberg](https://discourse.mc-stan.org/u/sarahsaxtonstrassberg)\
**Replies:** 2\
**Last updated:** [April 2, 2025, 7:06am UTC](https://discourse.mc-stan.org/t/stepwise-aic-or-equivalent-for-interaction-terms-in-brms/39192 "2025-04-02T07:06:32Z")

</div>

Hi! I’m trying to determine what interaction terms (if any) I should include in a phylogenetically informed brms model with a binary response variable. I have several predictors, including ordinal, binary, and continuous…

---

## [High Pareto-k values for an IRT model with simulated datasets](https://discourse.mc-stan.org/t/high-pareto-k-values-for-an-irt-model-with-simulated-datasets/39194)

<div class="topic-metadata">

**Author:** [@Trung\_Dung\_Tran](https://discourse.mc-stan.org/u/Trung_Dung_Tran)\
**Replies:** 5\
**Last updated:** [April 2, 2025, 6:36am UTC](https://discourse.mc-stan.org/t/high-pareto-k-values-for-an-irt-model-with-simulated-datasets/39194 "2025-04-02T06:36:50Z")

</div>

Dear all, I have conducted a simulation study to check how loo works for an item response theory (IRT) model. Specifically, I generated datasets from an IRT model where there are six ordinal indicators which are conside…

---

## [Quantifying Uncertainty with the LOO-CV criterion](https://discourse.mc-stan.org/t/quantifying-uncertainty-with-the-loo-cv-criterion/39156)

<div class="topic-metadata">

**Author:** [@Tommaso11397](https://discourse.mc-stan.org/u/Tommaso11397)\
**Replies:** 10\
**Last updated:** [March 31, 2025, 9:08am UTC](https://discourse.mc-stan.org/t/quantifying-uncertainty-with-the-loo-cv-criterion/39156 "2025-03-31T09:08:21Z")

</div>

Hi everyone, I have a very brief, perhaps dumb question: when looking at the output of the LOO-CV, how do I interpret the magnitude of results? Meaning, perhaps a normal model performs worse than a mixture, but by a “sma…

---

## [LOO Model Comparison Alternative](https://discourse.mc-stan.org/t/loo-model-comparison-alternative/39151)

<div class="topic-metadata">

**Author:** [@halo2masterq](https://discourse.mc-stan.org/u/halo2masterq)\
**Replies:** 3\
**Last updated:** [March 27, 2025, 6:24pm UTC](https://discourse.mc-stan.org/t/loo-model-comparison-alternative/39151 "2025-03-27T18:24:06Z")

</div>

I ran a simulation study comparing two models and the fit comes out to be equivalent in terms of LOO. However, when i run both models through real data, it doesnt line up as cleanely and i have some high pareto K values. …

---

## [Loo for hierarchical model](https://discourse.mc-stan.org/t/loo-for-hierarchical-model/39158)

<div class="topic-metadata">

**Author:** [@tgajdos](https://discourse.mc-stan.org/u/tgajdos)\
**Replies:** 2\
**Last updated:** [March 27, 2025, 8:39am UTC](https://discourse.mc-stan.org/t/loo-for-hierarchical-model/39158 "2025-03-27T08:39:23Z")

</div>

Hello everyone, I have a question concerning loo for hierarchical models. I want to do a trial-level loo, but the number of trials differ across subjects. Therefore, the array of log\_lok contains missing or default valu…

---

## [Difference between kfold(..., joint = "group") and kfold(..., joint = FALSE) for brms model](https://discourse.mc-stan.org/t/difference-between-kfold-joint-group-and-kfold-joint-false-for-brms-model/39081)

<div class="topic-metadata">

**Author:** [@Henrik\_Singmann](https://discourse.mc-stan.org/u/Henrik_Singmann)\
**Replies:** 4\
**Last updated:** [March 18, 2025, 10:02am UTC](https://discourse.mc-stan.org/t/difference-between-kfold-joint-group-and-kfold-joint-false-for-brms-model/39081 "2025-03-18T10:02:42Z")

</div>

I am trying to understand the difference between kfold(..., joint = "group") and kfold(..., joint = FALSE) for a brms model with a grouping variable. The grouping variable, pid, is both used when fitting the model (as a …

---

## [Any other efficient methods for model comparsion(or model identification), like the LOOIC](https://discourse.mc-stan.org/t/any-other-efficient-methods-for-model-comparsion-or-model-identification-like-the-looic/38957)

<div class="topic-metadata">

**Author:** [@yz1308786079](https://discourse.mc-stan.org/u/yz1308786079)\
**Replies:** 3\
**Last updated:** [March 7, 2025, 5:49pm UTC](https://discourse.mc-stan.org/t/any-other-efficient-methods-for-model-comparsion-or-model-identification-like-the-looic/38957 "2025-03-07T17:49:31Z")

</div>

Hi, everyone, I have compared fifteen candidate models using both R-hat and LOOIC in Rstudio. The winning model had an R-hat value below 1.1 and the lowest LOOIC score among the other fourteen models. Additionally, I per…

---

## [State-space model selection](https://discourse.mc-stan.org/t/state-space-model-selection/38772)

<div class="topic-metadata">

**Author:** [@yksakana](https://discourse.mc-stan.org/u/yksakana)\
**Replies:** 2\
**Last updated:** [February 15, 2025, 6:47pm UTC](https://discourse.mc-stan.org/t/state-space-model-selection/38772 "2025-02-15T18:47:17Z")

</div>

Hi, I am struggling with model selection for state-space models coded in rstan. In my state-space models, the states (longitudinal positions of 10 fish individuals in a river) are assumed to follow a Cauchy random walk.…

---

## [Compare models with elpd calculated differently?](https://discourse.mc-stan.org/t/compare-models-with-elpd-calculated-differently/38778)

<div class="topic-metadata">

**Author:** [@AldenGriffith](https://discourse.mc-stan.org/u/AldenGriffith)\
**Replies:** 2\
**Last updated:** [February 14, 2025, 8:57pm UTC](https://discourse.mc-stan.org/t/compare-models-with-elpd-calculated-differently/38778 "2025-02-14T20:57:54Z")

</div>

I’m working on model selection for mixed models fit with brms. In most cases using loo works well, though I have to reloo sometimes. For at least one model, the number of reloos is quite high and I don’t seem to have eno…

---

## [Loglikelihood in bivariate beta mixture model with copula](https://discourse.mc-stan.org/t/loglikelihood-in-bivariate-beta-mixture-model-with-copula/36297)

<div class="topic-metadata">

**Author:** [@lorenzo\_cappiello](https://discourse.mc-stan.org/u/lorenzo_cappiello)\
**Replies:** 5\
**Last updated:** [January 20, 2025, 6:25pm UTC](https://discourse.mc-stan.org/t/loglikelihood-in-bivariate-beta-mixture-model-with-copula/36297 "2025-01-20T18:25:01Z")

</div>

\[edit: escaped the rest of the code\] Hi, I am trying to implement a hierarchical beta mixture model with fixed alphas and betas and prior on the components weights. Everything runs but I am having an hard time understa…

[Previous page](https://discourse.mc-stan.org/tag/loo/33.md?match_all_tags=true&tags%5B%5D=loo)

[Next page](https://discourse.mc-stan.org/tag/loo/33.md?match_all_tags=true&page=2&tags%5B%5D=loo)
