timjmiller / wham

State-space, age-structured fish stock assessment model
https://timjmiller.github.io/wham
Other
32 stars 16 forks source link

How are selectivity models and parameters defined in the ASAP3 file? #29

Closed brianstock-NOAA closed 3 years ago

brianstock-NOAA commented 3 years ago

Dear Tim and Brian,

Most of the slots in the input file are well described but others, for example, "Selectivity block" are not easy to follow because I do not know what the numbers mean. Do you have a manual or an input file (.txt) describing each slot?

brianstock-NOAA commented 3 years ago

Sorry - we haven't explained the input file structure in detail because (for now) we assumed WHAM users would have an ASAP3 data file already. Section 3 in Ex 4 shows how the selectivity blocks are defined in the ASAP3 file.

Each selectivity block has one of these options: 1 = age-specific, 2 = logistic, 3 = double-logistic, 4 = logistic (declining).

Each block has 4 columns and (# ages + 6) rows:

The number of rows is the number of ages (n.ages) + 6.

Rows pertaining to options that are not used are ignored. In other words, the example 4 file uses logistic selectivity (option 2). There are 6 ages in the assessment (so 12 rows in the selectivity block parameter matrix). Rows 7 and 8 specify the logistic selectivity parameters and are the only rows used.

Note that while you need to put some numbers in the ASAP3 file, you can overwrite them using the selectivity argument of prepare_wham_input(). See details in ?prepare_wham_input or Ex 4.

Thank you for the interest and feedback - we could certainly improve this part of the documentation.

ejosymart commented 3 years ago

Thanks Brian. It will help me configure the model. Also, I am going to review the prepare_wham_om_input function to get an initial input object to fit my stock.

brianstock commented 2 years ago

Improving documentation for the selectivity parameter setup in asap .dat files, since I am back on this page looking for it again...

Col 1: initial par value Col 2: estimation phase (not used in TMB/WHAM except if it is negative then WHAM fixes it at the initial value) Col 3: lambda (1 = add penalty, 0 = no penalty, freely estimated) (also not used in WHAM; no penalties for selectivity pars) Col 4: CV (strength of penalty, sig2 = log(CV*CV + 1), so lower value = tighter distribution = estimate kept closer to initial, see ASAP3 tech manual). Ex CV of 0.5 = sig2 of 0.22, CV of 0.25 = sig2 of 0.06.