Forums

Back

Diagnosing large recruitment deviation

Laura Lee, modified 2 Years ago.

Diagnosing large recruitment deviation

Youngling Posts: 95 Join Date: 3/31/16 Recent Posts

Hi all,

I have a decent model running except that the estimated recruitment deviation for the terminal year (2019) is unusually high and so recruitment for the final year is unrealistically high. I would appreciate any assistance in how to diagnose what may be causing this.

Thanks in advance for your time.

Cheers,

Laura

IT
Ian Taylor, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 117 Join Date: 12/8/14 Recent Posts

Hi Laura,

I haven't run your model yet, but looking at your input files, it appears you have no 2020 age data and the 2019 ages don't include age zero fish, so there's likely almost no information about the 2019 recruitment.

I would change this setting

2019 # last year of main recr_devs; forecast devs start in following year
to 2018 which would prevent the model from using the lack of information about 2019 recruitment to balance the recdevs from earlier years within the zero-centered vector of main recdevs.

If having 2019 as a late recdev in a separate non-zero-centered vector doesn't resolve the problem, it's worth trying to figure out what data are informing the value. It's not straightforward to do a profile over recdevs, but you could run the model without estimation from the estimated values in the .par file after changing the 2019 recdev value in that .par file to 0 to see what likelihood components change as a result. 

-Ian

Laura Lee, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 95 Join Date: 3/31/16 Recent Posts

Thanks so much, Ian. I made the suggested change without improvement. Is there a way to fix the recruitment deviation for my terminal year?

Cheers,

Laura

KD
Kathryn Doering, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 57 Join Date: 2/19/19 Recent Posts

Hi Laura,

 

Ian is on leave so probably won't be able to get back to you, though maybe others have suggestions! Sorry to hear this didn't help improve the recruitment.

 

I think recruitment can be fixed by changing :

0 #_read_recdevs  

in your model to 

1 #_read_recdevs

(for reading in just 1 fixed recruitment; more could be read in if desired)

Below it (if there are no lines needed for recruitment cycles), is the conditional input: 

# Year Dev

2019 0.1 # assume you want a dev of 0.1

 

This note is in the manual: 

Note: SS will rescale the entire vector of recruitment deviation after reading these deviations, so [for example,] by reading two positive values, all other recruitment deviations will be scaled to a small negative value to achieve a sum to zero condition before starting model estimation.

 

Hope this helps, 

Kathryn

 

Laura Lee, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 95 Join Date: 3/31/16 Recent Posts

Thank you, Kathryn, for your advice. I did try as you suggested and it didn't seem to have any impact on the estimated recruitment deviations or the estimated recruitment values. The only impact I could detect was on the gradients for the recruitment deviations and the total likelihood. Is this a possible bug in the model?

Cheers,

Laura

KD
Kathryn Doering, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 57 Join Date: 2/19/19 Recent Posts

Hi Laura,

 

Rick confirmed that I was mistaken about how the fixed recruitment deviations work, I apologize. Because recdevs are implemented as a devs vector in ADMB, it isn't possible to fix individual years of recruitment deviations, so this option only sets the starting values (see discussion on a github issue I opened in response to your findings). 

There might be some workarounds available (e.g., using time varying variables, perhaps?), but I am not sure that is a good solution. Perhaps others have ideas?

Thanks,

Kathryn

 

MC
Massimiliano Cardinale, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 40 Join Date: 2/23/17 Recent Posts

Hej Laura,

I run your model and beside the issue with the large year class in 2019 for which Ian gave a very useful suggestions, I noted some additional issues in the way the model is set. M of the males is estimated, is it that intentional? This is because the estimated M is very different from the fixed M for the females but the growth (which is also fixed) is very similar for the two sexes.  

You should use the ramp as suggested by r4ss for recdev and possibly use early rec dev as well.

You could use the float option for the q of the survey (see Manual), I also suggest to rebalance the phases of the estimated parameters, for example estimating most of the selectivity parameters in a later phase than currently done. 

You have very little fish in the large size classes, consider the option of mergeing those (can be done in the data using CompressBins). This will improve estimated of selectivity. The se of the 2018 observation of P146_autumn survey is very large compared to the others, is that intentional?

This was just a quick screen, there might more aspects of the model that might need attention.

Cheers

Max

Laura Lee, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 95 Join Date: 3/31/16 Recent Posts

Thanks so much, Max. These are great suggestions!

Cheers,

Laura

MC
Massimiliano Cardinale, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 40 Join Date: 2/23/17 Recent Posts

What about manipulating the par file and setting a specific recdev to a given value?

Cheers

Max

Richard Methot, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 219 Join Date: 11/24/14 Recent Posts

That approach could have unanticipated consequences because the rec_devs are implemented using option 1, which is a dev_vector which imposes a sum_to_zero constraint.  So changing one will cause changes by ADMB to all the others.

The options being used here are:

1 #do_recdev:  0=none; 1=devvector (R=F(SSB)+dev); 2=deviations (R=F(SSB)+dev); 3=deviations (R=R0*dev; dev2=R-f(SSB)); 4=like 3 with sum(dev2) adding penalty
1980 # first year of main recr_devs; early devs can preceed this era
2019 # last year of main recr_devs; forecast devs start in following year
4 #_recdev phase 
1 # (0/1) to read 13 advanced options
0 #_recdev_early_start (0=none; neg value makes relative to recdev_start)
-4 #_recdev_early_phase
0 #_forecast_recruitment phase (incl. late recr) (0 value resets to maxphase+1)
1 #_lambda for Fcast_recr_like occurring before endyr+1

So THREE possibilities are:

2 #do_recdev:   2=deviations (R=F(SSB)+dev); (1) NO SUM_TO_ZERO
1980 # first year of main recr_devs; early devs can preceed this era
2017 # last year of main recr_devs; forecast devs start in following year;  (2) SHORTEN SO THE LAST DEVS BECOME LATE DEVS AS PART OF THE FORECAST DEVS
4 #_recdev phase 
1 # (0/1) to read 13 advanced options
0 #_recdev_early_start (0=none; neg value makes relative to recdev_start)
-4 #_recdev_early_phase
0 #_forecast_recruitment phase (incl. late recr) (0 value resets to maxphase+1)
10 #_lambda for Fcast_recr_like occurring before endyr+1;  (3) INCREASE LAMBDA ON THE LATE DEVS SO THEY WILL NOT DRIFT SO FAR FROM 0.0

Laura Lee, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 95 Join Date: 3/31/16 Recent Posts

Thanks so much, Rick! All three seem to do the trick. I'll just need to choose among them. Such a huge help!!!

Cheers,

Laura

Richard Methot, modified 2 Years ago.

RE: Diagnosing large recruitment deviation

Youngling Posts: 219 Join Date: 11/24/14 Recent Posts

Great to hear.  Perhaps we can add this as a tip in the manual.