"Error in if (varx == 0) { : missing value where TRUE/FALSE needed" with fit$loo() but not loo::loo(fit$draws("log_lik"))
还没有人认领这个 Issue。
评估
调研方向
首先比较入口点 fit$loo() 和 loo::loo(fit$draws("log_lik")),并将报告的错误和 400-by-590 的对数似然矩阵作为参考案例。若共享了 Stan 程序和模拟文件,则使用它们重现该差异,然后验证两个入口点都能一致地处理此输入,且不会出现缺失值错误。
由索引模型根据 Issue 内容生成。
描述
Hi,
Unfortunately I don't have a reproducible example because this is just popping up with a few versions of a big model. When I fit the model with cmdstanr, the following works:
> loo::loo(fit_mvn$draws("log_lik"))
Computed from 400 by 590 log-likelihood matrix.
Estimate SE
elpd_loo -31300.8 3489.9
p_loo 323.5 14.9
looic 62601.5 6979.8
------
MCSE of elpd_loo is NA.
MCSE and ESS estimates assume independent draws (r_eff=1).
Pareto k diagnostic values:
Count Pct. Min. ESS
(-Inf, 0.62] (good) 367 62.2% 37
(0.62, 1] (bad) 177 30.0% <NA>
(1, Inf) (very bad) 46 7.8% <NA>
See help('pareto-k-diagnostic') for details.
But this doesn't:
> fit_mvn$loo()
Error in if (varx == 0) { : missing value where TRUE/FALSE needed
I checked and there's no NAs anywhere:
> fit_mvn$draws("log_lik") |> anyNA()
[1] FALSE
Does anyone have any idea? Sorry I can't be more helpful with reproducible code. I'd be happy to share the Stan program with simulation file.
Thanks,
Matt
- 主要语言
- R
- 星标
- 157
- 派生
- 38
- 平均合并
- 4 天 16 小时
- 30 天内合并 PR
- 2
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stan-dev/loo 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
Clean up issues 未关闭
难度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
easystats/performance#950 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
briandconnelly/airnow#9 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
OHDSI/CohortConstructor#774 ·
-
难度 2/5 1-3 小时 新手友好度 65/100