[ADMB Users] Turning parameters on and off

Mark Payne mpa at aqua.dtu.dk
Thu Feb 10 02:31:19 PST 2011


Hi,

I was wondering if anyone had suggestions for a good coding practice in ADMB that might help with the following problem.

I would like to have the ability to switch various parts of my model on and off at run-time, without having to edit and recompile. For example, I would like to use my ADMB fitting engine to fit e.g. a gaussian in time, and compare this to a fit with a gaussian + linear time trend. This can obvious be done with two different engines, but from a code maintenance and practical point of view, this is not optimal. I can pass a flag "fit linear trend" and use it to omit the linear trend component, but this then creates problems with the calculation of my Hessian and the sds ie the matrix ends up being singular, because some of the parameters are not used....

Does anyone have suggestions how I can have my cake and eat it too?

Cheers,

Mark



More information about the Users mailing list