[ADMB Users] an alternative to R for nonlinear stat models

Chris Gast cmgast at gmail.com
Wed Jun 16 12:11:14 PDT 2010


Hi Arni (and others),

My dissertation work involves use (and extension) of models of the same ilk
(sometimes exactly the same) as those described by Nancy Gove and John
Skalski in their 2002 article.  I began with R, and moved to my own
home-brewed C/C++ programs for the sake of of speed when fitting models and
real and simulated data.  In addition, we found that the estimated standard
errors (based on the inverse hessian output from optim()) were very
sensitive to tolerance criteria--often changing orders of magnitude.

I have recently made the move to ADMB to make use of the capabilities for
mixed effect models.  One of my current tasks involves simulating data (in
R), fitting models in ADMB via the shell() command in R, and importing .rep
files into R for processing results of multiple simulations.  In this
respect, I too describe my working environment as "R with ADMB," and
understand the relative benefits of this setup.  For these specific types of
models, I've found ADMB to be irreplaceable.  Similarly, I could not easily
summarize simulation results without R; both are vital components to the
work I'm doing.

With respect to your benchmarking suggestion:  I have many implementations
of models for real and simulated data in both R and ADMB (past and current
iterations of my work on the models described above), and may be able to
complete some of this work alongside my own work, although I don't yet claim
that either my R or ADMB implementations are completely optimized for speed.


Chris



-----------------------------
Chris Gast
University of Washington
Quantitative Ecology and Resource Management
cmgast at gmail.com


On Wed, Jun 16, 2010 at 11:39 AM, Arni Magnusson <arnima at hafro.is> wrote:

> As far as I can tell, Gove et al. (2002) might be a good example for
> benchmarking the optimization performance of R vs. ADMB. It would be great
> if expert R users/developers could tweak Beni's model so that the
> performance comparison is valid.
>
> The main purpose is not to see which is faster or more reliable, but to
> quantify how much performance is gained by moving from R to ADMB.
>
> I have just typed and uploaded an excerpt from an old but thorough
> benchmark, where ADMB outperformed Gauss, Matlab, and S-Plus (
> http://admb-project.org/community/benchmarks/optimization). The benchmark
> was performed in 1997 and an update would be very valuable, as software and
> hardware have improved since then.
>
> R is an interpreted language that can do just about anything. ADMB is a
> compiled language (thin layer on top of C++) that does optimization and
> nothing else. I don't think it is a realistic goal for R to match the
> optimizing performance of ADMB. I use R for most of my work, but crunch
> numbers with ADMB when computational speed and flexibility become an issue.
>
> As an analogy, data frames in R are great, along with functions like
> aggregate(), apply(), merge(), and xtabs(). But when the tables are too
> large and too many, it's time to delegate the problem to a relational
> database.
>
> In the case of model X, which is already implemented in R, it may take half
> an hour or half a month to convert it to ADMB, and the payoff depends on how
> often the model needs to be run. In the case of model Y, which is not yet
> implemented, some users may be quicker to implement it in R than in ADMB, so
> again it would be good to have an idea about the relative performance gain.
> Model Z may not run at all in R, due to its size and complexity.
>
> Although I started this email with "R vs. ADMB", my daily working
> environment is better described as "R and ADMB". I'm a regular contributor
> to both R (4 packages and a couple of functions in the base packages) and
> ADMB (dev core team). Others have contributed R packages to interface with
> ADMB (
> http://admb-project.org/community/admb-meeting-march-29-31/InterfacingADMBwithR.pdf/at_download/file),
> but for many the interface is just reading and writing text files.
>
> I fully appreciate the comfort and efficiency of the R working environment,
> and the benefits of performing most tasks inside the same environment. But
> the R community has no need to be on the defense against ADMB, any more than
> against relational databases. If you work with computationally intensive
> models, I encourage you to try out ADMB (admb-project.org, free software)
> and hopefully end up contributing ideas and/or code.
>
> Best regards,
>
> Arni
>
>
> P.S. Phew. Future emails mentioning ADMB on r-help can be more brief and to
> the point, citing this message for details.
>
>
> Windows ADMB-IDE installer
> http://code.google.com/p/admb-project/downloads/list?q=ide*exe
>
> Windows, Linux, and Mac OS standalone
> http://code.google.com/p/admb-project/downloads/list?q=windows
> http://code.google.com/p/admb-project/downloads/list?q=linux
> http://code.google.com/p/admb-project/downloads/list?q=macos
>
> ADMB modes for various editors, including Emacs and Vim
> http://admb-project.org/community/editing-tools
> _______________________________________________
> 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/20100616/80838319/attachment.html>


More information about the Users mailing list