Dear SS experts,
I'm working on the Southern stock of hake (Cantabrian Sea and Atlantic Iberian waters), and I’d like to ask the following question.
This year in the ICES assessment group, I should replace the recruitment estimate in the last year of data with the value from the stock-recruitment curve (i.e., set the recruitment deviation to 0) before running projections.
To do this, I edited the ss.par file manually and set the recruitment deviation for that year to 0. Then, I ran the command:
in order to forecast without re-estimating the model. However, when I check the newly generated ss.par file, I see that the recdev value has changed slightly and is now 0.001 instead of the 0 I had entered.
Do you know why this happens?
Is there a way to prevent this small change and ensure the value remains exactly as specified?
Thanks in advance for your help.
Best regards,
Marta Cousido
Just a quick follow-up to my previous message:
I’ve noticed that if, instead of using the ss -maxfn 0 -phase 99 command, I set the line in starter.ss to:
then the recruitment deviation in the terminal year does stay exactly at zero, as intended.
However, the issue is that the bias adjustment is still being applied, and as a result, the final recruitment estimate differs slightly from the expected value from the stock-recruitment curve.
Thanks again!
Dear SS experts,
Thank you very much for your response, Jason and Rick.
I'd like to provide a bit more detail on the issue, as I realize my previous message may have been too incomplete.
In the ICES Assessment Working Group, we run the SS model and, once that is done, we modify the forecast file to generate the projections accordingly. At this stage, the model is not re-estimated — we simply run the model again with 0 # Turn off estimation for parameters entering after this phase
so that the forecasts come from the SS model we presented to the group, without any changes to the parameter estimates.
The issue arises because we feel that the 2024 recruitment (the terminal year of data) may not be well estimated. So before generating new model files with an updated forecast file, we would like to override the 2024 recruitment value and set it equal to the SR prediction (i.e., dev = 0).
What we’d like to do is: without changing anything else in the model or re-estimating, set the 2024 recruitment deviation to 0 and also turn off the bias adjustment for 2024. I was able to set the recdev to 0 in the ss.par, but the bias adjustment is still being applied.
Turning off the 13 advanced recruitment options in the control file would affect all years — or even if adjusted just for 2024, it would require re-running the model, which we want to avoid, as that would likely alter more model outputs than just setting recdev_2024 = biasadj_2024 = 0.
Regarding the type 1 and type 2 recruitment options: we currently use type 1, but changing this during the group is not possible, as it’s a benchmark decision.
I hope this clarifies the issue better than in my previous message.
Is there a way to achieve what we need — keeping recdev_2024 = 0 and biasadj_2024 = 0 — without re-estimating the model?
Thank you again for your help!
Best regards,
Marta
--
You received this message because you are subscribed to the Google Groups "SS3 - Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ss3-forum+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ss3-forum/c4b3e98c-18f6-4bda-9fb5-9e7a9dc37591n%40googlegroups.com.
Dear SS experts,
Just a quick note to say you can disregard my previous message — I’ve already figured out the solution.
Thanks so much for your help!
Best,
Before getting into the solution that mentioned in the previous message, I’d like to clarify that our issue mainly arises because we want to avoid running the model again (i.e., we don’t want to re-estimate the model parameters). One of the reasons for this is that our model has convergence issues, so to confirm where the minimum likelihood is, we need to apply jittering. Therefore, we are looking for a solution that doesn’t require re-estimating all the parameters.
Then for solving the problem, I fixed the recruitment deviation for 2024 at 0 in the ss.par file, and to avoid the bias adjustment being applied to that year, I modified the control file and set #_end_yr_for_ramp_in_MPD to 2024 instead of 2025 (which was the previous value I had).
Then, I ran the model with 0 in the line # Turn off estimation for parameters entering after this phase in the starter.ss file. With this setup, I was able to get a recruitment estimate for 2024 equal to the stock-recruitment curve, without re-estimating the remaining model parameters—which was exactly what I needed for the projections.
After that I realized that for computing some measures I need estimates of variability for the model hence I need to run with the Hessian. To get the Hessian without re-estimating the model, I used the command:
ss -maxfn 0 -phase 99
What surprised me is that the model didn’t invert the Hessian. I wasn’t expecting that, because before the changes to the control file and ss.par (fixing the 2024 rec dev at 0), it was providing the Hessian. But after those changes, when I run the same command again, I no longer get it.
Am I doing something wrong? Or is there a known reason why this might happen?
Another issue I noticed when running the model this way to obtain the Hessian is that, as I mentioned in an earlier message, the recruitment deviation for 2024—which I had fixed at 0 in the ss.par file—can end up being slightly different from zero after executing -maxfn 0 -phase 99. The way I had previously managed to keep the rec dev for 2024 exactly at zero was by setting 0 in the line Turn off estimation for parameters entering after this phase in the starter.ss file and run the model but this approach isn’t suitable when a Hessian is needed. Given this, could it be that the approach of fixing the 2024 recruitment deviation to zero in the ss.par file and adjusting the final year's bias in the control file might not work if we need to run the model with the Hessian? Is this solution only viable if we don't need to obtain the Hessian?
Thanks a lot again for your help — and apologies for all the questions! We're currently working on an ICES assessment group, and some of these situations are new to us, so your support is very much appreciated.
The issue we observed—where running the model with -maxfn 0 -phase 99 after setting the 2024 recruitment deviation to 0 in ss.par resulted in a rec dev for 2024 different than 0—was due to the recruitment deviation rescaling that ADMB performs when reading the ss.par file.
To address this, I changed the method to recdev_approach = 2, which allows us to use ss -maxfn 0 -phase 99 without the rescaling of recdevs in ss.par. Thanks to Rick for pointing this out!
The only remaining issue is with the Hessian. Before making any changes to the control file and ss.par (i.e., before fixing the 2024 rec dev at 0), the model was successfully producing the Hessian using ss -maxfn 0 -phase 99. However, after those changes, running the same command no longer yields a Hessian.
I assume this is because obtaining the Hessian under these conditions isn't possible unless a full model estimation is performed.
A separate but related issue is that even when I set 2023 as the final year for main recruitment deviations in the control file and run a full model estimation, a recruitment deviation value for 2024 still appears in the report, labeled as Late_RecrDev_2024. I’ve reviewed the manual but haven’t found a way to remove that late rec dev.
Thank you so much for your help!
To view this discussion visit https://groups.google.com/d/msgid/ss3-forum/d7861a82-1dd5-4e01-beae-8d6dfd14ebean%40googlegroups.com.
Hi Ian,
Thank you very much for your response.
I have run the model with a negative value in "0 #_forecast_recruitment phase (incl. late recr) (0 value resets to maxphase+1)", and now the Late_RecrDev_2024 is at zero as we need.
Thanks again for your help!
Best regards,