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

Tony Plate tplate at acm.org
Fri Nov 24 23:19:20 CET 2006

Did you try supplying gradient information to nlminb?  (I note that 
nlminb is used for the optimization, but I don't see any gradient 
information supplied to it.) I would suspect that supplying gradient 
information would greatly speed up the computation (as you note in 
comments at http://otter-rsch.ca/tresults.htm.)

I'm curious -- when you say "R may not be a suitable platform for 
development for such models", what aspect of R do you feel is lacking? 
Is it the specific optimization routines available, or is it some other 
more general aspect?

Also, another optimization algorithm available in R is the "L-BFGS-B" 
method for optim() in the MASS package.  I've had extremely good 
experiences with using this code in S-PLUS.  It can take box 
constraints, and can use gradient information.  It is my first choice 
for most optimization problems, and I believe it is very widely used. 
Did you try using that optimization routine with this problem?

-- Tony Plate

dave fournier wrote:
> 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.
>    https://stat.ethz.ch/pipermail/r-help/2006-January/086841.html
>    https://stat.ethz.ch/pipermail/r-help/2006-January/086858.html
> 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
>      http://otter-rsch.ca/tresults.htm
> 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.
>         Cheers,
>          Dave
> ~

More information about the R-help mailing list