gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

naturalmortality: M by-age by default #113 #127

Closed lentinj closed 7 months ago

lentinj commented 8 months ago

Set the default to be by_age = TRUE.

@bthe do you want to try this to see if anything is terribly broken before merging?

lentinj commented 8 months ago

@vbartolino this would affect your models too if we merge it. g3_init_guess('\\.M$', 0.2, 0.001, 1, 0) would need to become g3_init_guess('\\.M\\.[0-9]+$', 0.2, 0.001, 1, 0), to account for there being a separate M parameter for each age. Alternatively, make changes along the lines of the example to restore the previous behaviour: https://github.com/gadget-framework/gadget3/blob/issue-118-M-by-age/man/action_naturalmortality.Rd#L85-L92

Thoughts on whether this is a sensible default also appreciated!

bthe commented 8 months ago

I don't see any major problem with changing the query in g3_init_guess, although it certainly requires some familiarity with regular expression. @willbutler42 and I will have a look to see if this causes any major issues and report back.

willbutler42 commented 8 months ago

Gets a thumbs up from me, think it's a sensible default and had no issues when testing it out : )