[feat]: get index error distribution from SS3 models
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- r
- Ambito
- data-visualization
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- R
- Stelle
- 20
- Fork
- 10
- Merge medio
- 3g 8h
- PR unite (30g)
- 31
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nmfs-ost/stockplotr
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
nmfs-ost/stockplotr#470 ·
I maintainer di solito rispondono entro 1 giorno
-
Address R cmd check warningsForse già presa @sbreitbart-NOAA l’ha presa 3 giorni fa. Aperta
nmfs-ost/stockplotr#459 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[refactor]: merge multiple models into singular file for standard outputForse già presa @JZahner1 l’ha presa oggi. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
nmfs-ost/stockplotr#457 · 14 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Check for obs and exp. for each example data in the packageForse già presa @Schiano-NOAA l’ha presa 4 giorni fa. Apertaquestion
nmfs-ost/stockplotr#452 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Add make_rda and rda bundle to composition plotsForse già presa @Schiano-NOAA l’ha presa 4 giorni fa. Apertadevelopment enhancement
nmfs-ost/stockplotr#451 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nmfs-ost/stockplotr
Issue simili
-
bug key bindings source editor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
REQ - Positron IDE guidanceForse già presa @johannajokio l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
get_procs() @return docs don't match returned columns, and pid column is the row indexForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
posit-dev/connectapi#532 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Huber-group-EMBL/Rarr#294 ·
I maintainer di solito rispondono entro 1 giorno