I would strongly recommend that you take a look at the RTMB package
... it's a very low-threshold way to get autodiff gradients and near-C++
speed from your objective function.
https://cran.r-project.org/web/packages/RTMB/vignettes/RTMB-introduction.html
https://kaskr.r-universe.dev/articles/RTMB/RTMB-tips.html
On 12/30/25 07:32, Ruben Roa Ureta via R-help wrote:
Thanks Ben, John, Richard
You confirm my experience: above certain amount of RAM there are no
improvements in speed.
It cost me 3K euros to learn that, but the machine will be good for image
processing.
So for largish nonlinear models, over a 100 parameters, optimization in R would
best be done with analytical gradients or by calling code written in C++
(autodiff TMB or ADMB) or FORTRAN.
It seems to be the best option, as parallelization of computations with the
obj. function would be entering unknown territory.
For intermediate problems with 50-100 parameters, even a laptop with 36 GB RAM
finish in a few hours, which is good enough for me.
Regards.
R.
---
Ruben H. Roa-Ureta, Ph. D.
Consultant in Statistical Modeling
ORCID ID 0000-0002-9620-5224
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.