timjmiller / wham

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

for age-specific selectivity allow user-specified ages that share the same parameters #60

Closed timjmiller closed 4 months ago

timjmiller commented 2 years ago

allow user to force different ages to have the same selectivity but still estimated. This can be helpful when selectivity for some ages are inestimable. It is possible outside of the wham R functionality

Rick-Methot-NOAA commented 2 years ago

One approach to doing this is the random walk across ages as implemented in SS3. See case 17 in attachment. SS_selex.tpl.txt

brianstock commented 2 years ago

Agreed. Perhaps add a $map_pars element to the selectivity list argument to prepare_wham_input, consistent terminology to initial_pars and fix_pars.

It's probably worth doing this for M also. Currently you can add, for example, M$est_ages = 5:6 to fix M at the initial values for ages 1-4 and estimate M for ages 5 and 6, but this estimates two independent M parameters. Would be good to add M$map_ages = c(NA, NA, NA, NA, 1, 1) to fix M at initial for ages 1-4 and estimate one shared M for ages 5-6. Or to estimate two M parameters, one for ages 1-4 and one for 5-6: M = list(est_ages = 1:6, map_ages = c(1, 1, 1, 1, 2, 2)).

brianstock commented 2 years ago

Added a map_pars argument to set_selectivity for the SSWG, https://github.com/timjmiller/SSRTWG/commit/052952fa472fe761dde0900e1d9c9dd08587413b. Need to test before merging into wham/devel.

timjmiller commented 2 years ago

Could @brianstock add ability to set initial/fixed values for RE correlation and variance parameters analogous to those options in set_NAA and set_M functions in the SSRTWG repo?

On Fri, Jul 8, 2022 at 9:55 AM Brian Stock @.***> wrote:

Added a map_pars argument to set_selectivity for the SSWG, @.*** https://github.com/timjmiller/SSRTWG/commit/052952fa472fe761dde0900e1d9c9dd08587413b. Need to test before merging into wham/devel.

— Reply to this email directly, view it on GitHub https://github.com/timjmiller/wham/issues/60#issuecomment-1179017956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIGN7HGNMK5TF3JZJCOPH3VTAXM7ANCNFSM5VYKJI4A . You are receiving this because you authored the thread.Message ID: @.***>

-- Timothy J. Miller, PhD (he, him, his) Research Fishery Biologist NOAA, Northeast Fisheries Science Center Woods Hole, MA 508-495-2365

brianstock commented 2 years ago

Added $initial_sigma, $map_sigma, $initial_cor, and $map_cor optional arguments to set_selectivity(), https://github.com/timjmiller/SSRTWG/commit/3741fded0f0f6c312a1f3a43da80a4982fad112b. Not yet tested. Should also be able to specify RW across ages with selectivity = list(model = 'age-specific', re = 'ar1', initial_cor = 1, map_cor = NA).

timjmiller commented 4 months ago

This is fixed on devel branch. set_selectivity has an argument (map_pars) which allows the user this flexibility. However, options were also added some time ago by @brianstock