Skip to content

revise-code-for-catchability-with-bias-correction#544

Merged
Rick-Methot-NOAA merged 5 commits intomainfrom
535-feature-implement-survey-errtype-that-adds-lognormal-bias-adjustment
Jan 12, 2024
Merged

revise-code-for-catchability-with-bias-correction#544
Rick-Methot-NOAA merged 5 commits intomainfrom
535-feature-implement-survey-errtype-that-adds-lognormal-bias-adjustment

Conversation

@Rick-Methot-NOAA
Copy link
Collaborator

What tests have been done?

<-- - [] Test files are in the issue. -->

What tests/review still need to be done?

needs close look by a math-stat whiz

Is there an input change for users to Stock Synthesis?

revision for T-dist

Copy link

@Cole-Monnahan-NOAA Cole-Monnahan-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The equations check out, although I must admit I did get a bit lost in the float options. But I feel confident the lognormal with bias correction and Q as a parameter is correct.

My minor comments are mostly about how this may break backward compatibility with t-distributions in use already.

Edit: I should add that I was also convinced by the performance in the test case in this comment.

@Rick-Methot-NOAA
Copy link
Collaborator Author

Thanks Cole for the good suggestions. I originally was going to retain T-dist exactly as you suggest. The reason I went with the distribution you reviewed is that it allowed for options >=0 to use log(surveyobs) and all options <0 would be in normal space. I have never seen anyone use the T-dist (and wish we had a database of all applications so I would know!) , so I felt that the risk was low. But the risk is not zero, so I will consider you recommendation.

@iantaylor-NOAA
Copy link
Contributor

I found an email from 2020 in which Max Cardinale (@akatan999) referenced using the t-distribution for index likelihoods. It came up because the index plots in r4ss were not working correctly for t-distributed indices. I think the bug was present for at least 6 months and since nobody else reported the issue during that time, it's possible that nobody else was using the t-distribution feature.

@Rick-Methot-NOAA
Copy link
Collaborator Author

Thanks Ian. I will maintain backward compatibility.

@kellijohnson-NOAA
Copy link
Contributor

We are attempting to use the t-distribution for the age-1 index of Pacific Hake abundance in the 2024 stock assessment per your recommendations @Rick-Methot-NOAA when I talked to you last year about trying to fit estimates of zero.

@kellijohnson-NOAA
Copy link
Contributor

Also, regarding my review of this code. I am right in the middle of an assessment so if you need my review it will have to wait until at least next week. Sorry.

@Rick-Methot-NOAA Rick-Methot-NOAA merged commit 89e1346 into main Jan 12, 2024
@Rick-Methot-NOAA Rick-Methot-NOAA deleted the 535-feature-implement-survey-errtype-that-adds-lognormal-bias-adjustment branch January 12, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: implement survey errtype that adds lognormal bias adjustment

5 participants