[ADMB Users] Matrix functions for ADMB-RE

dave fournier davef at otter-rsch.com
Fri May 2 07:17:28 PDT 2014

It appears that you can do what you want with this version of solve.

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

The point is that you can do the solve and get the ln_det at the same time.
This avoids doing 2 LU decompositions.  (A Choleski decomp would
be even better.)

something like.

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

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

More information about the Users mailing list