[ADMB Users] Matrix functions for ADMB-RE
Mollie Brooks
mbrooks at ufl.edu
Fri May 2 07:51:14 PDT 2014
Thanks Dave.
That’s so handy!
Sorry Oliver, I checked that solve() existed for RE, but not ln_det(). This convenient version of solve() seems to exist for both RE and standard ADMB.
I’ll try to add both types of dmvnorm(diff, varcov) soon.
Cheers,
Mollie
------------------------
Mollie Brooks, PhD
Postdoctoral Researcher, Population Ecology Research Group http://www.popecol.org
Institute of Evolutionary Biology & Environmental Studies, University of Zürich
On 2 May 2014, at 16:17, dave fournier <davef at otter-rsch.com> wrote:
>
> 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);
>
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20140502/305485ba/attachment.html>
More information about the Users
mailing list