-
Notifications
You must be signed in to change notification settings - Fork 16
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
spawner-recruitment with "a, b" formulation and impact of timevary biology on benchmark calcs #191
Comments
Brainstorming: with unexploited spawning biomass per recruit = ϕ0 and But this could only be used to report h and R0 conditioned on there not being time-varying biology. If biology is time-varying, for a given a,b there will be a different implied steepness and R0 for each year. This could easily be reported in the SPR_SERIES table because that table already calculates SSBzero from annual biology. Note that annual biology is the result of the time series of annual biology parameters, it is not the equilibrium result of annual biology parameters. That should be an option. |
Sounds good to me. |
got it working and produces same result as R0, h approach. |
This is excellent, thank you. |
attached is spreadsheet in which I investigate plausible ranges for the alpha and beta parameters. |
Trying again to tag @timjmiller and @liz-brooks for any tips on initial values and ranges for the alpha beta parameterization of the Beverton-Holt SRR. See messages and attachment from @Rick-Methot-NOAA in this github thread. |
Thanks Ian. In my first trials, I can get the same answer (haven't done any trials with time-varying biology yet) as with the R0,h approach, but convergence path is ragged. (haven't done any trials with time-varying biology yet). ADMB makes some bad jumps early in the search even though the initial values for parms were not far off. Definitely worse than performance with R0,h. |
something got broken in MSY calcs |
in wham initial value for ln(a) = 0. For B-H initial value for ln(b) = 0 and for Ricker ln(b) = -10 maybe a better guess would be by determining a and b from some initial guess for R0 (e.g. exp(10)) and h (e.g., 0.7) and unfished ssb/r (averaged over the time series if necessary). You probably already have these but eqs for getting a and b are here for BH and here for Ricker |
Thanks Tim. I got off-track for awhile until realizing that SS3 already had some alpha, beta code based on R = aS/(b+S) such that your a,b and mine did not match. I have now aligned SS3 a,b to be same as yours. |
are you all set on this based on tim's reply?
i let this slip too far down the queue, but wasn't sure if you "close"
issues on this list serve or not.
cheers
liz
…On Mon, Feb 13, 2023 at 9:09 PM Richard Methot ***@***.***> wrote:
Thanks Tim. I got off-track for awhile until realizing that SS3 already
had some alpha, beta code based on R = aS/(b+S) such that your a,b and mine
did not match. I have now aligned SS3 a,b to be same as yours.
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFL5LIZANJAW5BASJVP3JLWXLSMDANCNFSM5ADSFN2A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Liz Brooks, PhD
Operations Research Analyst
Population Dynamics Branch
NOAA/NMFS
Northeast Fisheries Science Center
166 Water Street phone: 508.495.2238
Woods Hole, MA 02543 fax: 508.495.2393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
NWFSC and SWFSC folks discussed this new Brooks (2024) paper on recruitment https://doi.org/10.1016/j.fishres.2023.106896 which renewed interest in availability of the a-b (alpha-beta) parameterization of the Beverton-Holt stock-recruit relationship. @Rick-Methot-NOAA, do you think this is feasible to get into the next release and is there any support you need to do so? |
We need careful consideration of implications for depletion calculations. They already are somewhat wrong when there is time-varying growth. |
Tim, |
Rick,
That makes sense that for a given year of biology you get equivalent
results for either a,b or R0,steepness parameterization. You can translate
from one to the other for expected recruitment. I'm pretty sure this is
what ASAP does, too. The issue though is that one needs to keep track of
which year of biology is used to define R0 (and S0) and steepness. For
example, if one is using more recent biology (that is different) to
calculate SSB/R and Y/R for management reference points, you would not want
to use the estimated steepness and R0 in those calculations because they
are functions of different biology parameters. You would need to translate
the earlier R0 and steepness into a,b and then calculate the new R0 and
steepness with the current biology to be comparable to other equilibria
based on recent biology.
Using the a,b parameterization makes the bookkeeping much easier, because
the post-recruit biology only comes into the equation when calculating
reference points or any other equilibrium points and it is easier to make
sure the time-specific biology is consistent between different equilibrium
attributes. e.g., unfished SSB and R and those at Fmsy. It also makes it
easier to understand where the variation in equilibrium points is coming
from (pre-recruit biology or post-recruit biology).
A regime shift in R0 could be due to changes in post-recruit biology and/or
the a,b parameters. If the shift is due to the former, we can calculate
this change in R0 over time from annual calculations of R0 (and other
equilibria) with the changing biology but constant a,b. I think one would
want to be careful about whether the regime shift is in a and/or b
parameters vs. post-recruit biology.
Tim
…On Tue, May 21, 2024 at 5:40 PM Richard Methot ***@***.***> wrote:
Tim,
The SS3 implementation of the R0h approach does not update the unfished
SSB/R when there is time-varying biology (except in the rare case where
there is a regime shift in R0). So, it is equivalent in performance to the
a,b which implicitly finds values for those correlated a,b parameters that
find the same shape and elevation for the curve. I'll work this comparison
into the demonstration I'm developing.
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIGN7GEAFPBCI4LFOQ2ZXTZDO5N3AVCNFSM5ADSFN2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGM2DQNJXHAZQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Timothy J. Miller, PhD (he, him, his)
Research Fishery Biologist
NOAA, Northeast Fisheries Science Center
Woods Hole, MA
508-495-2365
|
i think there is confusion here between (1) what is assumed mathematically
in deriving R0h and (2) how the SRR is coded in SS.
for (1), you must define a replacement line to translate from ab to R0h.
if none of the biological parameters vary over time, then there is a unique
replacement line with slope = 1/spr0. if any of those biological
parameters vary over time (M, maturity, "fecundity"), then there is not a
unique replacement line. in that case, the choice of biological parameters
impacts the calculation of spr0, and this in turn will influence where the
replacement line intersects the SRR defined by ab and therefore produces
different R0h estimates depending on which biological parameters you
pointed to for the replacement line calculation. since the ab
parameterization does not depend on the replacement line, fitting that
parameterization will return the same estimates of ab even if biological
parameters are time varying.
for (2), in your previous message you said "The SS3 implementation of the
R0h approach does not update the unfished SSB/R when there is time-varying
biology..."
it sounds like you're saying that if biological parameters are time varying
and you ignore that, then there is no difference in the R0h estimates. but
maybe i'm misinterpreting you?
i think the point we have been trying to make is that it DOES make a
difference. pointing to year 1 for the biological parameters is arbitrary,
and if you pointed to a different year, you'd get a different estimate of
R0h. your time series estimates of recruits and spawners would probably
look very much the same (mosly driven by the data). but if you are
bothering to estimate the SRR, then presumably you want to use them to
derive reference points and make projections -- both of those would be
impacted by having time-dependent R0h parameters. the replacement line
assumption seems to be a behind the scenes assumption in the code that
perhaps some users don't recognize (and maybe can't specify or change or
explore). thus, if you move to the ab parameterization, there is no
assumption that needs to be made about which biological parameters to use
in fitting the SRR. then reference point specification and projections are
separate steps where the analyst is cognizant (and transparent) about which
biological parameters are assumed to derive the reference points (again,
they define the calculation of spr0).
cheers
liz
…On Tue, May 21, 2024 at 5:40 PM Richard Methot ***@***.***> wrote:
Tim,
The SS3 implementation of the R0h approach does not update the unfished
SSB/R when there is time-varying biology (except in the rare case where
there is a regime shift in R0). So, it is equivalent in performance to the
a,b which implicitly finds values for those correlated a,b parameters that
find the same shape and elevation for the curve. I'll work this comparison
into the demonstration I'm developing.
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFL5LLNHCDBW73MFB3EW5DZDO5N3AVCNFSM5ADSFN2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGM2DQNJXHAZQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Liz Brooks, PhD
Operations Research Analyst
Population Dynamics Branch
NOAA/NMFS
Northeast Fisheries Science Center
166 Water Street phone: 508.495.2238
Woods Hole, MA 02543 fax: 508.495.2393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Let me work out the examples before responding further. R0 and the R0,h approach are very deep in the DNA of SS3. Major changes to SS3 are not anticipated; instead these issues should be aimed at how best to develop the FIMS approach to use of spawner-recruitment. |
It may be useful looking at this formulation using the FIMS_statistical_computing_investigations tool. here is an example analyzing the double logistic function. here is the generated report. |
I took the liberty of running the Beverton-Holt variation in the functional analysis tool. Assuming that I coded it correctly, it would appear that beta has a higher level of derivative stochasticity, which could make convergence for some quasi-newton minimizers more difficult. If you're interested, the code is here and the results are here. You may want to verify the fixed values for phi and S. Hope this helps with your investigation. |
Thanks for chiming in Matthew. I don't think I can use that for what I'm doing in SS3, but it seems very useful for eventual development in FIMS. |
I now have a comparison between SS3 using R0h and SS3 using AB. The comparison was run using a situation with time-varying growth such that fish body size increases substantially in later portion of the time series and into the projection. The R0h approach gets expected recruitment from:
where Recr_virgin_adj and SSB_virgin_adj are from the biology at start of the time series and are not (in this example) allowed to be updated with changing conditions. The results of the two runs were identical to rounding error. Same recruitment time series, same fit to data, same MSY, same projection. The MSY calculations in both runs were set to use start year biology, a user control in SS3. This caused MSY to be much less than projected catch because the projected catch used the increased body weight, but the MSY did not. This difference needs to be made more apparent to the SS3 user that currently is done. Switching the MSY calculation to use end year biology had an effect on Fmsy and MSY and BMSY and now is consistent with the level of MSY from the projection at FMSY. It still was the same between the Roh run and the AB run. As I continue working on this, my emphasis will be on clearly altering users to what changes might be occurring due to time-varying biology with R0h. I'll keep the AB option, but not emphasize any need for users to switch away from R0h. Equivalent results can be obtained. |
hi rick,
thanks for following up with these comparisons. your results are what we'd
expect when you point to either the beginning or end of the time series for
your biological parameters (though i don't think it would work if a prior
is specified on h). is the user option to only point to a single year of
biological parameters, or would it be possible to specify a range of years
(e.g., to reflect average prevailing conditions)? a further thought, if
you just fit average recruitment with deviations, are SPR calculations
pointing to the first year by default or a user-specified year (or range of
years) that is consistent with projections?
out of curiosity, what were the estimates from those two cases for R0, h,
Fmsy, Bmsy, MSY as well as terminal year estimates of F/Fmsy, B/Bmsy, and
B/B0? i would expect that differences in the h estimate due to year
selected for biological parameters will carry through to perceptions about
sustainable stock levels and current stock status and depletion.
alerting users to that specification sounds like a good plan. do you want
to leave it up to the user to make individual runs exploring the
consequence of the year they choose, or do you want to provide a table
and/or plot in the results that automatically makes all of those
translations of R0h so the user can see the range of values corresponding
to biological parameters for each model year? i.e., since you can get back
to ab from your R0h specification, and from ab you can then solve for the
annual R0h (this is what is done and is reported in ASAP).
cheers
liz
…On Fri, May 24, 2024 at 12:34 PM Richard Methot ***@***.***> wrote:
I now have a comparison between SS3 using R0h and SS3 using AB. The
comparison was run using a situation with time-varying growth such that
fish body size increases substantially in later portion of the time series
and into the projection.
The R0h approach gets expected recruitment from:
NewRecruits = (4. * steepness * Recr_virgin_adj * SSB_curr_adj) /
(SSB_virgin_adj * (1. - steepness) + (5. * steepness - 1.) * SSB_curr_adj);
where Recr_virgin_adj and SSB_virgin_adj are from the biology at start of
the time series and are not (in this example) allowed to be updated with
changing conditions.
The AB approach uses:
NewRecruits = (alpha * SSB_curr_adj) / (1.0 + beta * SSB_curr_adj);
So, the values of alpha and beta subsume to effect of virgin biology and
steepness.
The results of the two runs were identical to rounding error. Same
recruitment time series, same fit to data, same MSY, same projection.
The MSY calculations in both runs were set to use start year biology, a
user control in SS3. This caused MSY to be much less than projected catch
because the projected catch used the increased body weight, but the MSY did
not. This difference needs to be made more apparent to the SS3 user that
currently is done.
Switching the MSY calculation to use end year biology had an effect on
Fmsy and MSY and BMSY and now is consistent with the level of MSY from the
projection at FMSY. It still was the same between the Roh run and the AB
run.
As I continue working on this, my emphasis will be on clearly altering
users to what changes might be occurring due to time-varying biology with
R0h. I'll keep the AB option, but not emphasize any need for users to
switch away from R0h. Equivalent results can be obtained.
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFL5LLXXV74B4XLVB77HPTZD5TYVAVCNFSM5ADSFN2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSHE4TKOBWHA3Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Liz Brooks, PhD
Operations Research Analyst
Population Dynamics Branch
NOAA/NMFS
Northeast Fisheries Science Center
166 Water Street phone: 508.495.2238
Woods Hole, MA 02543 fax: 508.495.2393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Yes, I have built into the reports the translation between R0h and AB. |
@chantelwetzel-noaa @shcaba `SPAWN_RECRUIT report:19 parm parm_label value phase sigmaR: 0.6 Quantities for MSY and other benchmark calculations RecDev_method: 2 Initial_equilibrium: 0 # 0/1_to_use_spawner-recruitment_in_initial_equ_recruitment_calculation Yr SpawnBio exp_recr with_regime bias_adjusted pred_recr dev biasadjuster era mature_bio mature_num raw_dev SPR0_curr h_curr R0_curr P1 P2 P3 P4 |
I think this expanded output is relatively clear and includes all the needed information. Thanks! |
Below is the promised demonstration. My conclusion is that the R0h approach is different from the alpha-beta approach only when invoking time-varying SPR0, which is never done in assessments I have seen. Even then, the difference is small and not wrong, just different. Report below: Estimate the model with AB approach, which reports the equivalent R0 and h (steep) and uses that R0 in starting the population. Estimation the model with R0 and h. In the Spawn_Recr table of report.sso, SS3 presents the annual R0 and h implies by the AB parameters and that year's biology. These values are reported, but are not used in calculations. The values gradually increases to ln(R0) = 11.7566 and steep = 0.60523. Same output for the AB run and the R0h run. Add to the estimation run the possibility that a spawn_recr parameter is time varying with a block change in 1985. This is before the growth change. Set the block offset to be 0 so that R0 does not change, but the code logic sees that it could change. This invokes code logic that updates SPR0 annually for use in the SRR calculations. FOr the AB run, do the block on the beta parameter; again with no change realized. With Bmark_yr set to 1971: and long-term projection, which always uses time-varying biology, shows: Note that depletion (Bratio) is using Bmsy as denominator: Now change Bmark_yr to 2001, a year for which biology is still changing: #_Mgmt_Quantity shows bigger biomass and catch, but note that biology is not in equilibrium long-term projections are larger that MSY because growth continues to increase. Here is bodywt at age for some relevant years: last year of timeseries and basis for MSY caLCS 10th year of long projection last year of long projection The difference between the MSY result and the long-term projection result is an indication of the outstanding need for the capability to use equilibrium growth in the MSY calculations. Note that I remembered to turn off the control rule so projections are at FMSY, not reduced for ABC SSB_2079 26191.9 0 Recr_2079 5519.84 0 F_2079 0.103543 0 Bratio_2079 1.02088 0 OFLCatch_2079 4379.24 0 note that MSY catch is 4319, so slightly smaller because more body growth in the projection. This section of the forecast-report.sso output has a bit more information, especially the recruitment level. I have created a new issue for adding recruit to the standard management quantity report.: find_Fmsy_to_maximize_dead_catch The time_vary SR_parm flag causes SS3 to use the current year's biology to recalc SPR0 and use that SPR0 in executing the R = F(SSB) code. This is not routine!!! With the AB approach, and not using timevary beta, the logL is 1367.46. Note that time_vary SR_parm flag is nearly never used in assessments. All assessments used the start year biology's SPR0 when executing the spawner-recruitment relationship, so produce identical results as when the AB approach is used. Note also that both the R0h and the AB approaches use the current year's fecundity when calculating the spawning biomass; there is no difference in that regard. |
@timjmiller @liz-brooks Base: Experiment: Conclusion: |
hi rick,
alpha and beta both changed by a factor of 10 (10 times larger for
Experiment), while spr0 got 10 times smaller for Experiment. the fact that
h and R0 are unchanged is expected because alpha or beta always multiplies
spr0 when you translate from the alpha beta parameterization to the h R0
parameterization:
h = alpha*spr0 / (4+alpha*spr0)
R0 = (alpha*spr0 -1)/beta*spr0
the thought experiment in section 3 of miller and brooks walks through what
happens if you have a simple scalar change within a single assessment time
series (i.e., not scaling the whole time series and comparing two separate
runs).
…On Wed, Jun 26, 2024 at 5:52 PM Richard Methot ***@***.***> wrote:
@timjmiller <https://github.com/timjmiller> @liz-brooks
<https://github.com/liz-brooks>
Here is experiment to show the effect of a change in fecundity units.
Base run has fecundity = 1.0, so reproductive output is same as mature
female biomass.
Experiment run sets fecundity to 0.1
all parameters get updated in the model run.
Base:
SPR0_(virgin): 7.44189 #_uses_biology_from_start_year: 1971
Ln(alpha): -0.510467 alpha 0.600215
Ln(beta): -9.62761 beta 6.58841e-05
steepness_derived: 0.527563
ln(R0)_derived: 8.7637
Experiment:
SPR0_(virgin): 0.744189 #_uses_biology_from_start_year: 1971
Ln(alpha): 1.79203 alpha 6.00162
Ln(beta): -7.32514 beta 0.000658766
steepness_derived: 0.527541
ln(R0)_derived: 8.7637
Conclusion:
SPR0 changes 10x as expected.
parameters alpha and beta get much different estimated values
model time series results and -logL were identical
h and R0 derived from the estimated alpha and beta were identical; e.g.
unaffected by the rescaling of SPR0.
—
Reply to this email directly, view it on GitHub
<#191 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFL5LN6RKHHZNCQ2EW4OTLZJMZ3JAVCNFSM5ADSFN2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJZGI3DQNJXGUZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Liz Brooks, PhD
Operations Research Analyst
Population Dynamics Branch
NOAA/NMFS
Northeast Fisheries Science Center
166 Water Street phone: 508.495.2238
Woods Hole, MA 02543 fax: 508.495.2393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
After much, much staring at the code. I find that the call to Equil_Spawn_Recr_Fxn will not always send the correct SSB0 and R0. Equ_SpawnRecr_Result = Equil_Spawn_Recr_Fxn(SR_parm_work(2), SR_parm_work(3), SSB_unf, Recr_unf, SPR_temp); // returns 2 element vector containing equilibrium biomass and recruitment at this SPR FUNCTION dvar_vector Equil_Spawn_Recr_Fxn(const prevariable& SRparm2, const prevariable& SRparm3, Problem with above pairing is that Equil_Spawn_Recr_Fxn needs to access the real virgin values unless the SR_update_SPR0 flag is set due to time-varying For the Spawn_Recr function which is called during time series and forecast, the pairing is: FUNCTION dvariable Spawn_Recr(const prevariable& SSB_virgin_adj, const prevariable& Recr_virgin_adj, const prevariable& SSB_current) where SSB_use and R0_use are set to virgin or are updated depending on the SR_update_SPR0. To align the terminology: For the receiving functions, |
@Rick-Methot-NOAA, I haven't followed the progress on the stock-recruit revisions very closely, but I think your explanation makes sense. However makes sense to you to sort all this out will be fine with me. |
I determined that we need fuller control over when the SSBpR0 is updated and used. Therefore, I have re-purposed an used placeholder in the Spawner-recruitment input to provide this control:
|
add control for basis of HCR inflection:
|
paper by Miller and Brooks advocates for using the "a", "b" formulation of SRR curves, rather than steepness, when there is time varying biology which affects the spawners per recruit calculation.
A related / affected issues is #341 and #625
Task List:
The text was updated successfully, but these errors were encountered: