gadget-framework / gadget3

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

Model helper functions #48

Closed bthe closed 2 years ago

bthe commented 3 years ago

Tossing around a list of functions that would be nice to have/should be implemented. These would broadly fall into the following categories:

lentinj commented 3 years ago

Model skeletons (is this a good idea? )

I think so. At very least it'll become obvious quickly if they're too annoying :)

manipulate recruitment/define spawning

I'm still reasonably convinced that most actions should be considering projections out-the-box, and something that you set up when configuring the rest of the model. Manipulating already-existing models to bodge recruitment to keep working sounds like a pretty perilous approach IMO.

bthe commented 3 years ago

I'm still reasonably convinced that most actions should be considering projections out-the-box, and something that you set up when configuring the rest of the model. Manipulating already-existing models to bodge recruitment to keep working sounds like a pretty perilous approach IMO.

Yes, this is definitively something to think about, and the default should be to use random effects for all time-varying processes to base the projection.

The standard process is to fit model first, follow the big ICES rule book and determine the breakpoint in the hockey-stick function. Then use two or more spawning functions to run 1000+ projections some years into the future. In this case one could just estimate the parameters of the spawning functions, treating the deviations as random effects. This would actually solve two problems as it would also give you the error distribution for the projections.

willbutler42 commented 2 years ago

For actions to consider projections out-of-the-box, perhaps having cur_year_projection defined if project_years = 0L would help? For instance, a spawning action could be incorporated into a non-projecting model and subsequently activated for projections using run_f = cur_year_projection... I assume this could be done by removing if (have_projection_years) on line 59 of action_time?

lentinj commented 2 years ago

@willbutler42 correct on all counts, removed the if statement.

lentinj commented 2 years ago

Remaining bits now in the issues above