wham
wham copied to clipboard
selectivity re="ar1" with model = "age-specific" options to prepare_wham_input function
selectivity$model = "age-specific" without random effects will estimate or fix each age-specific selectivity parameter (estimated as fixed effects) according to specifications of the asap3 dat file or (over-ridden by) selectivity$initial_pars and selectivity$fix_pars arguments. When selectivity$re = "ar1" is added, all of the age-specific selectivity fixed effects are still estimated along with corresponding age-specific random effects. This fit is unlikely to (or will never?) converge properly because there are two parameters for each category. (The variance of these random effects goes to 0).
The appropriate default should be to estimate a single fixed effect parameter as the mean across ages to which the age-specific ar1 random effects are added. This can be done by setting the appropriate input$map$logit_selpars entries to be the same value for all estimated ages in the selectivity block. Some care may be needed for convergence when most or all of the ages are fixed with selectivity$fix_pars.
I expect this would also be problematic for other selectivity$model options.