You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@EJDick-NOAA noted that an index with all observations excluded via negative fleet number was not appearing in the plot comparing all indices created by SS_plots(). The current logic (in https://github.com/r4ss/r4ss/blob/main/R/SSplotIndices.R#L631-L632) is to not show the index at all if all of the the observations are excluded, but if at least one observation is included in the likelihood, then all of them appear in the plot.
The status-quo setup doesn't make much sense as it leads to silly plots like the one below for 2022 hake where the years without a survey have dummy observations in order to get expected values from the model. In this case the points should not appear in the plot. On the other hand, this plot could be useful to see how an index compares to the others even if it's not included in the likelihood for the final model.
Two options for cleaning this up are
Never plot observations that are excluded from the likelihood. This would solve the hake plot issue. If you want to exclude an index from the model but include it in this figure, you would need to set lambda = 0 (as described below) and keep the fleet numbers positive.
Add an additional input to give the user control over whether excluded observations get plotted or not.
I like option 1 better but thought I would post this for feedback before making any changes.
Note: to exclude an index via lambda = 0, you would include something like the lines below near the bottom of your control file:
I honestly haven't thought all of the way through this but option one seems to muddy the waters with settings in the control file dictating output for {r4ss} where I see the control file as settings just for SS3. That is, I wouldn't want to have to change my control file to make {r4ss} plot something differently so I think that it should be an input argument to the function.
@EJDick-NOAA noted that an index with all observations excluded via negative fleet number was not appearing in the plot comparing all indices created by
SS_plots()
. The current logic (in https://github.com/r4ss/r4ss/blob/main/R/SSplotIndices.R#L631-L632) is to not show the index at all if all of the the observations are excluded, but if at least one observation is included in the likelihood, then all of them appear in the plot.The status-quo setup doesn't make much sense as it leads to silly plots like the one below for 2022 hake where the years without a survey have dummy observations in order to get expected values from the model. In this case the points should not appear in the plot. On the other hand, this plot could be useful to see how an index compares to the others even if it's not included in the likelihood for the final model.
Two options for cleaning this up are
I like option 1 better but thought I would post this for feedback before making any changes.
Note: to exclude an index via lambda = 0, you would include something like the lines below near the bottom of your control file:
The text was updated successfully, but these errors were encountered: