[ADMB Users] Matrix functions for ADMB-RE

dave fournier davef at otter-rsch.com
Fri May 2 15:08:50 PDT 2014


Turns out that there is a stupid mismatch between the solve for 
dvariables and the
solve for df1b2variables.  Easiest workaround is to change sgn to a 
dvariable in the
tpl as in



dvariable ld;
dvariable sgn;
df1b2vector tmp=solve(varcov,diff,ld,sgn);

nLL+=.5*(nobs*log(2*M_PI)+ld+ diff*diff);


and then to add this section at the bottom of your tpl file.



GLOBALS_SECTION

   #include <admodel.h>
   #include <df1b2fun.h>
   #include <adrndeff.h>

   df1b2vector solve(const df1b2matrix& aa,const df1b2vector& z,
     const df1b2variable & ln_unsigned_det,double& sign);


   df1b2vector solve(const df1b2matrix& aa,const df1b2vector& z,
     const df1b2variable & ld,df1b2variable& sign)
   {
     double sgn;
     return solve(aa,z,ld,sgn);
   }




More information about the Users mailing list