nmfs-ost / ss3-doc

Source code for the Stock Synthesis manual and other documentation
https://nmfs-ost.github.io/ss3-website/
Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

expand on and clean up predator fleet text #109

Closed k-doering-NOAA closed 6 months ago

k-doering-NOAA commented 2 years ago

https://nmfs-stock-synthesis.github.io/doc/SS330_User_Manual.html#predator-fleet-mortality https://nmfs-stock-synthesis.github.io/doc/SS330_User_Manual.html#predator-fleets

Text on predator fleets can use editing for clarity. Also, including example inputs would be helpful. This text will also need expanding based on recent developments (e.g., by area) once these are merged into main.

MauroMardones commented 1 year ago

where is that examples? Related to predator fleets I mean.

chantelwetzel-noaa commented 1 year ago

@MauroMardones The manual does not currently have example input for a predator fleet but does try clearly describe how it can be incorporated (fleet type = 4) in the data file and then the needed parameter line in the control file. Can you provide more information on what exactly you are looking for?

MauroMardones commented 1 year ago

I am trying to generate a time series vector of an index of predation on the fishery, perhaps even with sd. But when I want add it, it's not clear to me if I should assign it as an index (which is what I think) or define it as discard fleet anyway.

As I told you, I'm thinking of an index more than anything else. According to the manual it is possible but I am not clear where to assign it and if I add lines to the MG_parm in the same way.

If you can help me with that. ill appreciate @chantelwetzel-noaa

iantaylor-NOAA commented 1 year ago

Hi @MauroMardones, We will probably need some help from @Rick-Methot-NOAA on this. This is a new feature and I'm not aware of who may have applied it anywhere yet.

I just tried adding a predator fleet for the first time in the attached files (based on the "simple_small" model used for testing r4ss https://github.com/r4ss/r4ss/tree/main/inst/extdata/simple_small).

The changes I made were as follows:

Data file:

  1. increase the number of fleets by 1
  2. add a fleet to the Fleet Definitions with Fleet Type = 4 (predator fleet) in the data file
  3. add an index to CPUE_and_surveyabundance_and_index_observations with units = 2 = F and provide some index time series data
  4. add the predator fleet to the length and age composition controls (but I didn't add any comp data)

Control file:

  1. reduce the fixed NatM parameter from 0.1 to 0.05.
  2. add a "M2_pred1" parameter immediately after the "FracFemale_GP_1" in the mortality and growth parameter section. I just copied the NatM parameter line and changed the bounds.
  3. add the new fleet to the length- and age-based selectivity setup (I chose to make selectivity = 1.0 in both dimensions to avoid having to add additional parameters, but you would want to specify whatever made sense based on the information you have about what sizes or ages are being preyed upon).

The input files after these changes are in the this zip file: simple_small_predator.zip. It runs in SS3 version 3.30.21 and estimates the M2_pred1 parameter at 0.044, resulting in a total natural mortality M1 + M2 = 0.05 + 0.044 = 0.094, which is close to the 0.1 value used in generating the data for this model.

What I didn't do was add catch data or discard data for the predator fleet and I note that the fit to the predator effort index is poor (my made-up index slowly declines whereas the expected values are constant).

@Rick-Methot-NOAA, what additional steps would a user need to take to fit a predator effort index? I presume that if I had made the index very precise, the model could have used recdevs to better fit it, but in general I assume folks are trying to represent changes in predator abundance via an index, not changes in the prey.

MauroMardones commented 1 year ago

Hi @iantaylor-NOAA

Thank you very much for these ideas and examples. I'm going to configure the model with my data this week and I'll see how it goes. I didn't quite understand that about the NatM (reduced? why? fixed you said?). I've been talking by email with @Rick-Methot-NOAA and my doubts are precisely the reason for your poor fit, bc I do not have any discard data either.

I will see my results and tell you.

Thank you so much

iantaylor-NOAA commented 1 year ago

@MauroMardones, as you say we have a plan to discuss further by email with others and then circle back to improve the SS3 documentation.

Just to clarify the point about mortality:, the simple_small toy model that I was using had M fixed at 0.1 and the data were generated as a parametric bootstrap from a previous model that also had M fixed at 0.1, so if M were estimated, it would likely remain close to that fixed value. In order to increase the chance of getting a reasonable estimate of the new M2 parameter, I reduced the value of the fixed M to 0.05. Thus, I was please to see that the total M from the two sources was similar to my expectation of ~1.0. But of course this isn't a real stock and the data are all simulated.

MauroMardones commented 1 year ago

Hi @iantaylor-NOAA .

Im adding krill data this week. Please just check it this. In ctl file;

_Q_setup for fleets with cpue or survey data

_1: fleet number

_2: link type: (1=simple q, 1 parm; 2=mirror simple q, 1 mirrored parm; 3=q and power, 2 parm; 4=mirror with offset, 2 parm)

_3: extra input for link, i.e. mirror fleet# or dev index number

_4: 0/1 to select extra sd parameter

_5: 0/1 for biasadj or not

_6: 0/1 to float

_ fleet link link_info extra_se biasadj float # fleetname

     2         1         0         1         0         0  #  SURVEY1
     3         1         0         0         0         0  #  SURVEY2
     4         1         0         0         0         0  #  **SURVEY2**

SURVEY 2 its predator fleet right? ('cause its mentioned as fleet 4)

Takk firir in advance!

e-perl-NOAA commented 6 months ago

Predator vignette on ss3-website now exists and expands on predator fleets. Closing this issue but feel free to reopen if further expansion or clean up of predator info needs to be done.

MauroMardones commented 6 months ago

Thanks Ely. I see new features (1+) about Predator fleets. I will check this. Thanks for to inform this.