You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The map argument in TMB::MakeADFun() allows us to collect groups of variables to a common value, i.e. estimate them as a single parameter. This could be very useful for us, e.g for the parameters defining initial number at age and time-varying maturity where you sometimes would like to fix them to a single value. Using the map argument would allow us to do this without having to recompile.
Could this be achieved by adding an additional column, defining the parameter group, to the parameters object?
The text was updated successfully, but these errors were encountered:
Another option, as the value column is a list we could also set the value to the name of the controlling parameter. But I'm not sure relying on the value column being a list is a great plan.
Looking closer, TMB's map is useless to us. The mapping is only within a parameter (which could be a vector or array). We can't map 2 separate parameters. The man page even makes this explicit:
More advanced parameter mapping, such as collecting parameters between different vectors etc., must be implemented from the template.
Apart from some very early code, we don't use TMB parameter vectors / arrays, we decided the resultant data.frame is too messy. Maybe we could convert them internally, but this would be a fair bit of fiddling.
The
map
argument inTMB::MakeADFun()
allows us to collect groups of variables to a common value, i.e. estimate them as a single parameter. This could be very useful for us, e.g for the parameters defining initial number at age and time-varying maturity where you sometimes would like to fix them to a single value. Using themap
argument would allow us to do this without having to recompile.Could this be achieved by adding an additional column, defining the parameter group, to the parameters object?
The text was updated successfully, but these errors were encountered: