NOAA-FIMS / FIMS

The repository for development of FIMS
https://noaa-fims.github.io/FIMS/
GNU General Public License v3.0
13 stars 9 forks source link

[Feature]: should input R data ages always start at zero? #141

Open ChristineStawitz-NOAA opened 2 years ago

ChristineStawitz-NOAA commented 2 years ago

Is your feature request related to a problem? Please describe.

There are inconsistencies between assessment models about how to define the age vector; attempt to summarize the options below.

  1. start at age 1
  2. start at age 0
  3. start at arbitrary user defined age
  4. some models have one set of ages, SS3 has population and data ages

Describe the solution you would like.

The EWAA (@EJDick-NOAA @iantaylor-NOAA and @ChristineStawitz-NOAA ) would like to put a stake in the ground to always start ages at age 0. For species where there is no age 0 data, we can just populate the data with zeros or NAs for unobserved ages as appropriate.

In future milestones we may need to separate population vs data ages but will push that off to milestone 2.

Describe alternatives you have considered

Due to C++ and TMB starting indexing at zero, it seems like a no brainer to start at zero on the back end. But we did also consider starting indexing at age 1 on the front end to make it easier for users coming from R/ADMB conventions. But we decided against this because 1. subtracting one every time could lead to bugs and 2. for fast-growing fish, they may have data or catch at age 0.

Statistical validity, if applicable

This has the potential to reduce error from misspecifying ages.

Describe if this is needed for a management application

I believe IATTC needs age 0 fish to model tuna accurately

Additional context

No response

cmlegault commented 2 years ago

"The age at recruitment should also be greater than zero, otherwise there is no period for the pre-recruit mortality rates to act." (Miller and Brooks Steepness is a slippery slope https://doi.org/10.1111/faf.12534) argues for not starting ages at zero.

JonBrodziak commented 2 years ago

Starting at an arbitrary user-chosen age provides the best flexibility to the stock assessment modeler. This also provides the potential for a more accurate representation of expected or average relationship (over prevailing conditions) for the spawner to recruit process dynamics. This was one of the approaches used in an early version of the Toolbox AGEPRO model which was later changed to a fixed initial model age of age-1 to simplify the bookkeeping for recruitment dynamics.

As noted by Chris and others, forcing the modeler to always use age-0 limits the spawner--recruitment process model to only account for density-dependent and density-independent processes impacting recruitment between the egg/embryo (or appropriate age-0 days stage) through the age-0 period. This constrains the choice of time lag between spawner and recruit which may make modeling early life history survival processes accurately more difficult. That said, starting the population model at age-0 is in many cases going to be computationally convenient. And for fast growing species, such as scombrids and billfishes, this may be also be more accurate for fishery selectivity of subadults, e.g., an age-1 striped marlin may have length about 1.4 meters in some regions and be vulnerable to a lot of fishing gears at age-0.

If one makes the choice based on software construction, then the idea that the base time unit for a population model needs to be one year should be reconsidered. Growth dynamics of squids, for example occur on much shorter time scales than a year and maybe a nextgen software modeling platform needs to account for this in its initial architecture. Note I do not have any specific recommendation on this design feature but suggest thinking about it and then rethinking it until there is a solid consensus with good reason-giving provided.

Not a decision needed to implement milestone 1 but an important consideration for the potential scope and application of FIMS products.

JonBrodziak commented 2 years ago

Forgot to mention an associated question, if one starts the population model at age-0, then what is natural mortality at age-0 (with an annual time step) and can this parameter be adequately characterized with a stationary mean?

On Fri, May 27, 2022 at 7:43 AM Christine Stawitz - NOAA < @.***> wrote:

Is your feature request related to a problem? Please describe.

There are inconsistencies between assessment models about how to define the age vector; attempt to summarize the options below.

  1. start at age 1
  2. start at age 0
  3. start at arbitrary user defined age
  4. some models have one set of ages, SS3 has population and data ages

Describe the solution you would like.

The EWAA @.*** https://github.com/EJDick-NOAA @iantaylor-NOAA https://github.com/iantaylor-NOAA and @ChristineStawitz-NOAA https://github.com/ChristineStawitz-NOAA ) would like to put a stake in the ground to always start ages at age 0. For species where there is no age 0 data, we can just populate the data with zeros or NAs for unobserved ages as appropriate.

In future milestones we may need to separate population vs data ages but will push that off to milestone 2. Describe alternatives you have considered

Due to C++ and TMB starting indexing at zero, it seems like a no brainer to start at zero on the back end. But we did also consider starting indexing at age 1 on the front end to make it easier for users coming from R/ADMB conventions. But we decided against this because 1. subtracting one every time could lead to bugs and 2. for fast-growing fish, they may have data or catch at age 0. Statistical validity, if applicable

This has the potential to reduce error from misspecifying ages. Describe if this is needed for a management application

I believe IATTC needs age 0 fish to model tuna accurately Additional context

No response Code of Conduct

  • I agree to follow this project's Code of Conduct

— Reply to this email directly, view it on GitHub https://github.com/NOAA-FIMS/FIMS/issues/141, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVXIZS3I7VB5T4UI6LPNVTVMECU3ANCNFSM5XE4LLQQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Jon Brodziak, Ph.D. NOAA Inouye Regional Center Pacific Islands Fisheries Science Center 1845 Wasp Boulevard, Building 176, NMFS/PIFSC/FRMD Mail Room 2247 Honolulu, Hawaii 96818 USA Phone: 808-725-5617 Email: @.***

“Wherever my travels may lead, paradise is where I am.” ~ Voltaire

The views expressed in this message are my own and do not necessarily reflect any position of NOAA.

ChristineStawitz-NOAA commented 2 years ago

Thanks for the comments Chris and Jon. A couple of responses:

Clarifications

  1. re: Jon's comment on sub-year timesteps. We have talked with the CASAL2 team a lot about their timing approach which I think we are aiming to mimic. I believe it allows timesteps to be of any length of time, or even different lengths of time. So I mean just to talk about where to start indexing where the unit of time can be flexible.
  2. For the record, we are not proposing that age-at-recruitment be set to 0, I am proposing the data vectors input into the model begin indexing at age 0 and can have the first few values be either 0 or NA if recruitment happens after age 0. I don't see how this is different than what our existing class of models do theoretically.

Questions/further comments:

  1. I am reading the linked paper as that the age-at-recruitment applies to how you interpret SR parameters, e.g. you can't compare steepness estimates between a number of populations for which age-at-recruitment is zero because steepness is a function of pre-recruit mortality which doesn't exist in this case.
  2. It also seems like this only applies when a density-dependent recruitment function is used. So we could throw a warning if someone enters non-zero data for age 0 fish and then tries to fit a BH or Ricker model.

I am still not sure what that means for the case of tuna then. It seems more important to account for catch of age 0 fish than to force the model to start later than age 0 when there is age 0 catch. Or is it a moot point if recruitment is density-independent in any models of a fish fast-growing enough to have age-0 catch?

kellijohnson-NOAA commented 1 year ago

@ChristineStawitz-NOAA has a decision been made on what to do regarding modeling of ages? We are modifying the FIMSFrameAge class to have the information that the model needs and we are wondering if the number of ages is the number of ages in the data or the number of ages from zero to the maximum age in the data? Thanks!

ChristineStawitz-NOAA commented 1 year ago

Ages right now are handled as the number of ages in the data, though I moved this to M2 since we could change this later!