[R] Nonlinear statistical modeling -- a comparison of R and AD Model Builder

dave fournier otter at otter-rsch.com
Fri Nov 24 22:06:51 CET 2006

There has recently been some discussion on the list about
AD Model builder and the suitability of R for constructing the
types of models used in fisheries management.



I  think that many R users understimate the numerical challenges
that some of the typical nonlinear statistical model used in different
fields present. R may not be a suitable platform for development for
such models.

Around 10 years ago John Schnute, Laura Richards, and Norm Olsen
with Canadian federal fisheries undertook an investigation
comparing various statistical modeling packages for a simple
age-structured statistical model of the type commonly used in
fisheries. They compared AD Mdel Builder, Gauss, Matlab, and
Splus. Unfortunately a working model could not be produced with Splus
so its times could not be included in the comparison. It is possible
to produce a working model with the present day version of R so that
R can now be directly compared with AD Model Builder for this type of model.

I have put the results of the test together with the original
Schnute and Richards paper and the working R and AD Model Builder
codes on Otter's web site


The results are that AD Model builder is roughly 1000 times faster than
R for this problem. ADMB takes about 2 seconds to converge while
R takes over 90 minutes.

This is a simple toy example. Real fisheries models are often hundred of
times more computationally intensive as this one.


David A. Fournier
P.O. Box 2040,
Sidney, B.C. V8l 3S3
Phone/FAX 250-655-3364

More information about the R-help mailing list