Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Mean recruitment adjustment #594

Open
Rick-Methot-NOAA opened this issue Apr 26, 2024 · 10 comments
Open

[Feature]: Mean recruitment adjustment #594

Rick-Methot-NOAA opened this issue Apr 26, 2024 · 10 comments
Assignees
Milestone

Comments

@Rick-Methot-NOAA
Copy link
Collaborator

Rick-Methot-NOAA commented Apr 26, 2024

Describe the solution you would like.

see discussion in #593
When using recdev option 1, the dev_vector with tuned bias adjustment forces the arithmetic mean recruitment of the time series to be consistent with the mean from the spawner-recruitment relationship.
This is because the spawner-recruitment relationship is used to produce MSY; MSY is not based on the time series of estimated recruitments.
With the transition to recommending that recdevs be based on recdev option = 2, which is not zero-centered, there is a concern that the MSY calculations will not be consistent with the mean of the recruitments.
It seems that MSY should remain based on the SRR, as adjusted by the mean deviation of the recdevs.
Solution 1: add a penalty to mean recdev to improve degree to which it is 0.0
Solution 2: base the benchmark quantities on log(R0) - mean(dev)

Describe alternatives you have considered

Rely on the sigma penalty to keep mean recruitment close enough to zero. However, it is clear that his does not always happen. A change to log(R0) can be perfectly offset by a drift in mean recruitment.

Statistical validity, if applicable

No response

Describe if this is needed for a management application

definitely important to not allow a know bias in this calculation

Additional context

No response

@Cole-Monnahan-NOAA
Copy link

Isn't option 1 just recreating the dev_vector, but more explicitly? Perhaps a better alternative for this option is to get the dev_vector working better in ADMB in general? Seems unlikely given the ADMB dev status.

I've always thought option (2) made the most sense. It should mimic the dev_vector approach in both the estimates and derived quantities, with no apparent downsides that I can anticipate. @jimianelli and I were discussing this recently. Any thoughts Jim?

@Rick-Methot-NOAA
Copy link
Collaborator Author

In principle yes, but some situations cause the mean of the devs to drift away from zero.

@Cole-Monnahan-NOAA
Copy link

Maybe I don't understand (likely) but I don't see why it matters whether there is a drift or not. Can we not consider the two approaches (dev_vector vs. post-hoc centering) just a different way of implementing the same feature? Or as you put it "A change to log(R0) can be perfectly offset by a drift in mean recruitment."

How can I help with this issue? Do some analyses need to be done?

@allanhicks
Copy link

allanhicks commented Apr 30, 2024 via email

@Rick-Methot-NOAA
Copy link
Collaborator Author

Rick-Methot-NOAA commented Apr 30, 2024

Thanks Allan,
My proposal is to modify the -logL for recdevs to include this term:
square((mean_dev - 0.0) / se))
where se is sigmaR / N.

current code (w/o rho) is:
recr_like = sd_offset_rec * log(sigmaR); // where sd_offset_rec is N adjusted for bias adjustment = sum(biasadj)
recr_like += norm2(recdev(recdev_first, recdev_end)) / two_sigmaRsq;

Note that all biasadj set to 1.0 for MCMC, so sd_offset_rec equals N years when going to MCMC!

@allanhicks
Copy link

allanhicks commented Apr 30, 2024 via email

@Cole-Monnahan-NOAA
Copy link

I don't know CASAL at all but from the manual it seems like they already implement Rick's option 2.

image

Here YCS is year class strength which when put into log space would be subtracting the mean.

Do I have that right?

@Rick-Methot-NOAA can you clarify option 2? I thought this would not change anything in the likelihoods or other calculations, and instead only impact benchmark calculations (presumably all in the forecast module?) by defining a new "mean recruitment" as lnR0-mean(devs) where the parameters would be estimated using the simple deviations. In other words, it wouldn't affect estimation, only post-hoc calculations. Am I missing something here?

@Rick-Methot-NOAA
Copy link
Collaborator Author

We're getting close...
Either:
(a) implement a penalty on mean(recdev) such that it is close enough to zero and we treat the remaining delta as noise;
or
(b) accept that with recdev option 2 there could be drift in mean(recdev), so create an adjusted log(R0)' = log(R0) + mean(recdev) to use in benchmark and forecast

We'll need to worry about how this plays with bias_adjustment when transitioning from MLE to MCMC

@Cole-Monnahan-NOAA
Copy link

With (b) can you confirm (intuitively at least -- we should check) that you should get the same benchmarks using dev_vectors and simple vectors when implementing the new option 2? In other words, will this break backwards compatibility?

@Rick-Methot-NOAA
Copy link
Collaborator Author

I would implement this as a new, not revised, option so we could test.
Logically, it should be the same as dev_vector.
Where it gets squirrely is in calculation of initial population size and then annual depletion, e.g. SSB(y)/SSB0. So I think that the offset needs to be applied there also to achieve the current total internal consistency of the SS3 time series.
Of course, this is just cementing further the SS3 dependence on the R0,h formulation of spawner-recruitment. There is another branch in which I explore the a,b formulation per Miller and Brooks. Which is totally feasible, except for reworking all of the depletion dependencies. I think I can make that work. Basically, the a,b approach lets you calculate the R0,h conditioned on start year biology then I need to work out what happens when biology changes during time series. If you have comments, please put them at #191

@Rick-Methot-NOAA Rick-Methot-NOAA modified the milestones: 3.30.23, 3.30.24 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

3 participants