[R] an alternative to R for nonlinear stat models

Arni Magnusson arnima at hafro.is
Wed Jun 16 20:39:23 CEST 2010


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



More information about the R-help mailing list