Scale uncertainty intervals if relative = TRUE for B and SB plots#230
Scale uncertainty intervals if relative = TRUE for B and SB plots#230sbreitbart-NOAA wants to merge 1 commit intodevfrom
Conversation
…B and SB plots
| estimate_lower = estimate_lower / ref_line_val, | ||
| estimate_upper = estimate_upper / ref_line_val |
There was a problem hiding this comment.
@sbreitbart-NOAA I am not sure if I fully understand what is going on here because I have not looked too terribly hard at the code but I just wanted to let you know that the uncertainty should be the uncertainty based on the actual derived quantity and not just the scaled uncertainty. For example, the uncertainty of biomass comes from the calculation of the confidence intervals of biomass using the standard deviation of biomass estimate. The same should be true for unfished biomass, where the uncertainty of what is being plotted should be from a standard deviation.
There was a problem hiding this comment.
I am not following. Here we are scaling down the uncertainty when relative = TRUE where all values on the plot are getting scaled by the reference line value. Are you saying that here the confidence intervals should be based on the error for the reference line?
Are the current calculation for error correct in filter_data?
Lines 680 to 689 in 0397a61
After review, I think they aren't correct except for SE, but I get confused with error calcs.
There was a problem hiding this comment.
@kellijohnson-NOAA thank you for noticing this- I remember discussing this a while back. I don't know the proper method to use here. Maybe the steering committee would know?
There was a problem hiding this comment.
If you were multiplying or dividing by a constant it would be fine but we aren't instead we are dividing my a calculated value that has its own uncertainty. There are ways to calculate the uncertainty of the result but more typically, you just output the derived quantity, e.g., time series of spawning_biomass/unfished_biomass, as another derived quantity and you get the uncertainty of the time series.
There was a problem hiding this comment.
Ah okay I see. This is jogging my memory now thanks!
Address #218