[ADMB Users] ADMB & R

Ben Bolker bbolker at gmail.com
Tue Aug 23 02:36:06 PDT 2011


On 11-08-24 04:29 AM, Rubén Roa wrote:
> Hi Laurie,
> 
> I am very interested and I think it would eventually become a standard
> in nonlinear modeling: control everything from R but when it comes to
> optimization, call an ADMB executable, a dll, or the C++ code created by
> makeadm. This is the plan with my R package CatDyn, available on CRAN.
> The current first version is a pure R implementation, that uses the
> recent package optimx for greater flexibility in selecting a numerical
> method and for numerical diagnostics such as the Karesh-Kuhn-Tucker
> optimality criteria. The next version of the package will give the
> choice to optimize using ADMB code instead of R's numerical methods. The
> model procedure I have in mind is:
> 1) pre-processing of data, and selection of initial parameter values
> with a toy version of the model in R,
> 2) optimization with ADMB code but controlled from R, with ADMB behind
> the scene, and
> 3) capture of results, model diagnostics, and plotting results in R.
> So I'm very interested in your work. If I can be of help I'd be glad,
> 
> Rubén

  A few quick comments:

 * I was going to mention that there were various issues with DLLs, and
that I had the impression that Dave Fournier had almost given up on the
idea -- but when I went searching for this discussion I found that it
was a discussion between Laurie and Arni Magnusson last year --
<http://groups.google.com/group/admb-users/browse_thread/thread/79140a8374f39548/761898236368961c?lnk=gst&q=memory>
-- so Laurie already knows more about it than I do.

 * making a bundled version of R and ADMB (being careful of the
different licenses) seems plausible, although just continuing to make
the installation process easier might be sufficient. Making an analogy
with WinBUGS/JAGS/etc. -- these tools have decent R interfaces but
require separate installation, but people mostly seem to manage. It
would be an interesting challenge to figure out how to bundle ADMB as
part of an R package, although it would be a very big package indeed ...

  * you should look at the existing R/ADMB interfacing projects
<http://admb-project.org/community/related-software/r> ... R2admb is not
perfect, but I have put a fair amount of work into it, and would be
happy to develop and (within limits) modify it to work with other
people's tools ...

> -----Original Message-----
> From: users-bounces at admb-project.org on behalf of Laurie
> Sent: Tue 8/9/2011 2:50 PM
> To: Users at admb-project.org
> Subject: [ADMB Users] ADMB & R
> 
> Maybe this is not the right forum for my email but here goes.
> 
> I am currently creating several R packages that use ADMB code; there are
> two ways of doing this i.e. use
>      1) an executable and text files (e.g. glmmADMB) or
>      2) create a dll or shared library
> 
> There are advantages and disadvantages of both approaches, but there are
> also some things that could be
> done to make it easier to mix ADMB & R, i.e. creation of
>      a) make files that allow R & ADMB to be compiled together across
> all platforms
>      b) a set of standard R functions/methods for reading and writing R
> & ADMB files
>      c) adding to the basic ADMB output files to make it easier to
> create R objects
> 
> There is also an R package Rcpp that makes it easier to create packages
> that combine R & C++, and this looks
> like something that could be "easily" adapted to make a generic R/ADMB
> interface.
> 
> I am actively working on these things now, and might even be able to
> find funding for others. Is there any interest in
> pursuing this?
> 
> 
> Laurie
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users




More information about the Users mailing list