[feat]: get index error distribution from SS3 models
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 54/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- r
调研方向
Read convert_output() and plot_index() to trace how $cpue becomes the plotted index intervals; the issue does not name source files or tests. Inspect how r4ss::SS_output() provides $survey_error and $survey_units, then decide how that information should be represented in the converted output. Done means index intervals reflect each SS3 error structure, including symmetric intervals for normal errors.
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
Thanks to @ericward-noaa for adding index intervals in https://github.com/nmfs-ost/stockplotr/pull/468/. This is an important feature that is important to be able to interpret the index fits.
One refinement needed in the future is to account for the fact that SS3 has multiple options for error structure for indices:
- -1=normal;
- 0=lognormal;
- 1=lognormal with bias correction;
- >1=df for T-distribution
Of these, lognormal probably covers at least 95% of models, but the normal error is used for models that include an environmental predictor of recruitment deviations.
The plot below was created loading stockplotr from Eric's fork associated with #468 and running the following code which relies on a petrale sole model with an index of recruitment deviations posted by @okenk. The "env" fleet uses normal error since the index spans zero so the intervals should be symmetric around the points and not tiny for observations close to zero.
petrale <- r4ss::SS_output('https://raw.githubusercontent.com/okenk/recruit_index_sims/refs/heads/main/simulations/petrale/0.2_30/30/em/')
petrale_converted <- convert_output(petrale)
plot_index(petrale_converted, interval = 0.95, module = "cpue")
Describe the solution you would like.
I don't think that convert_output() is currently getting the information on error structure. In Report.sso that's in a separate table from the main table of index output.
Currently, r4ss::SS_output() returns the table $cpue (which is converted and serves the basis for the plots) as well as two vectors $survey_units (which is probably not needed for plotting), and $survey_error, which contains the codes above.
I'm happy to modify r4ss::SS_output() to merge those vectors into $cpue so that units and error were just additional columns. These would then need to be somehow integrated into the table created by convert_output(), ideally in a format that is similar to what FIMS will use to store index error structure assuming that in the future there will be additional uncertainty options beyond the current ~ dlnorm() option.
Describe alternatives you have considered
stockplotr::convert_output() could also do the merging of the separate SS3 tables
Additional context
No response
- 主要语言
- R
- 星标
- 20
- 派生
- 10
- 平均合并
- 3 天 8 小时
- 30 天内合并 PR
- 31
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nmfs-ost/stockplotr 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 55/100
nmfs-ost/stockplotr#470 ·
维护者通常 1 天内回复
-
Address R cmd check warnings可能已有人在做 @sbreitbart-NOAA 于 4 天前认领。 未关闭
nmfs-ost/stockplotr#459 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[refactor]: merge multiple models into singular file for standard output可能已有人在做 @JZahner1 于 2 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 48/100
nmfs-ost/stockplotr#457 · 17 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Check for obs and exp. for each example data in the package可能已有人在做 @Schiano-NOAA 于 6 天前认领。 未关闭question
nmfs-ost/stockplotr#452 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add make_rda and rda bundle to composition plots可能已有人在做 @Schiano-NOAA 于 6 天前认领。 未关闭development enhancement
nmfs-ost/stockplotr#451 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 nmfs-ost/stockplotr 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 78/100
PecanProject/pecan#4236 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
nf-core/nanostring#195 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
bgreenwell/pdp#140 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 87/100