[ADMB Users] Are parameters scaled for optimization.

dave fournier davef at otter-rsch.com
Tue Dec 31 10:02:42 PST 2013

For a random effects model
The relevant code appears to be

if the scalefactor has not been set (i.e. =0)

  409 df1b2variable boundp(const df1b2variable& x, double fmin, double fmax,
  410   const df1b2variable& _fpen)
  411 {
  412   ADUNCONST(df1b2variable,fpen)
  413   df1b2variable t;
  414   //df1b2variable y;
  415   //y=x;
  416   double diff=fmax-fmin;
  417   const double l4=log(4.0);
  418   df1b2variable 
  419   t=fmin + diff*ss;

So the parameter is effectively scaled by diff.
Better would be

  418   df1b2variable 

The only difficulty would be that the function minimizer report does not 
deal with large numbers well.

For parameters whose scalefactor has been set the code is

460 df1b2variable boundp(const df1b2variable& _x, double fmin, double fmax,
  461   const df1b2variable& _fpen,double s)
  462 {
  463   ADUNCONST(df1b2variable,fpen)
  464   df1b2variable t;
  465   df1b2variable x=_x/s;
  466   //df1b2variable y;
  467   //y=x;
  468   double diff=fmax-fmin;
  469   const double l4=log(4.0);
  471   // ss is underlying varialbe on [0,1] and t lives in [fmin,fmax]
  472   df1b2variable 
  473   t=fmin + diff*ss;


  472   df1b2variable 

would be better.

I wrote a note about this earlier, but it did not generate much interest.

More information about the Users mailing list