[R] Very slow optim()

J C Nash pro|jcn@@h @end|ng |rom gm@||@com
Sat Mar 13 03:53:26 CET 2021

optim() has no method really suitable for very large numbers of parameters.

- CG as set up has never worked very well in any of its implementations
  (I wrote it, so am allowed to say so!). Rcgmin in optimx package works
  better, as does Rtnmin. Neither are really intended for 60K parameters

- optim::L-BFGS-B is reasonable, but my experience is that it still is not
  intended for more than a couple of hundred parameters.


On 2021-03-12 9:31 p.m., Jeff Newmiller wrote:
> Calculate fewer of them?
> If you don't setup your code to save intermediate results, then you cannot see intermediate results.
> On March 11, 2021 8:32:17 PM PST, "毕芳妮 via R-help" <r-help using r-project.org> wrote:
>> Dear list, 
>> I am using optim() to estimate over 60 thousans of parameters, and use
>> the server to run the program.But it took me 5 hours and there was just
>> no result coming out.How could I do to show some results that have been
>> calculated by optim()?
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list