[ADMB Users] C++ code for logistic-normal
Richard Methot - NOAA Federal
richard.methot at noaa.gov
Mon Dec 2 14:47:42 PST 2013
Thanks Steve.
Rick
On Mon, Dec 2, 2013 at 2:31 PM, Steve Martell <SteveM at iphc.int> wrote:
> Hi Dan, Rick,
>
> Here is what I have implemented thus far in iSCAM. If you save the cpp
> and header file in your tpl directory, then you'll have to recompile the
> code using
>
> > admb mycode logistic_normal
>
> I think that works; I use my own makefiles to compile the code. But if
> your using the most recent version of ADMB, it should be there.
>
> Note also that the logistic_normal is already in the ADMB source code (I
> put it there a couple of years ago). In the API search dmvlogistic. So
> you can use that as an alternative.
>
> Note I've implemented it as a class, to use it inside your tpl, you'll
> need the following:
>
> GLOBALS_SECTION
> #include "logistic_normal.h"
>
> and in the
> PROCEDURE_SECTION
> // Instantiate the object with observed matrix(O) and predicted matrix
> (P)
> logistic_normal cLN_Age(O,P);
>
> // Get the logistic normal likelihood
> nlvec(k) = cLN_Age.negative_loglikelihood(atau2(k));
>
>
> // Get the normalized residuals for plotting.
> nu = cLN_Age.standardized_residuals();
>
>
> On Dec 2, 2013, at 1:53 PM, chris.francis <chris.francis at clear.net.nz>
> wrote:
>
> > Hi Dan,
> >
> > Rick Methot is contemplating implementing the
> > logistic-normal likelihood in Stock Synthesis, and asked me
> > whether I had any C++ code I could send him to use as a
> > prototype for this implementation.
> >
> > Would you be able to send him (at the email address above)
> > the logistic-normal-related code you inserted into your paua
> > model? That would be great if you could.
> >
> > Actually, it would be useful if you could cc your email to
> > Steve Martell (address above), who already has LN1 in his
> > program (iSCAM), and is wanting to implement LN2-3.
> >
> > Cheers,
> >
> > Chris
>
>
> ------------------------------
>
> This internet e-mail message, and any files transmitted with it, contains
> confidential, privileged information that is intended only for the
> addressee. If you have received this e-mail message in error, please call
> us at (206) 634-1838 collect if necessary) and ask to speak to the
> message sender. Nothing in this e-mail or the act of transmitting it, is to
> be construed as a waiver of any rights or privileges enjoyed by the sender
> or the International Pacific Halibut Commission pursuant to the
> International Organizations Immunities Act, 22 U.S.C. Sec. 288 et seq.
>
--
*Richard D. Methot Jr. Ph.D.**NOAA Fisheries - **Science Advisor for Stock
Assessments*
*Office: 206-860-3365*
*Mobile: 301-787-0241*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20131202/6c52cace/attachment.html>
More information about the Users
mailing list