Re: [R] Very slow optim()

2021-03-13 Thread J C Nash
As per my post on this, it is important to distinguish between "CG" as a general approach and optim::CG. The latter -- my algorithm 22 from Compact Numerical Methods for Computers in 1979 -- never worked terribly well. But Rcgmin and Rtnmin from optimx often (but not always) perform quite well. Th

Re: [R] Very slow optim()

2021-03-13 Thread Deepayan Sarkar
On Sat, Mar 13, 2021 at 4:33 PM Spencer Graves wrote: > > Hi, Deepayan: > > > On 2021-03-13 01:27, Deepayan Sarkar wrote: > > On Sat, Mar 13, 2021 at 10:08 AM Spencer Graves > > wrote: > >> > >> TWO COMMENTS: > >> > >> > >> 1. DID YOU ASSIGN THE OUTPUT OF "optim" to an object, like "est <- > >>

Re: [R] Very slow optim()

2021-03-13 Thread Spencer Graves
Hi, Deepayan: On 2021-03-13 01:27, Deepayan Sarkar wrote: On Sat, Mar 13, 2021 at 10:08 AM Spencer Graves wrote: TWO COMMENTS: 1. DID YOU ASSIGN THE OUTPUT OF "optim" to an object, like "est <- optim(...)"? If yes and if "optim" terminated normally, the 60,000+ paramters should be there

Re: [R] Very slow optim()

2021-03-12 Thread Deepayan Sarkar
On Sat, Mar 13, 2021 at 10:08 AM Spencer Graves wrote: > > TWO COMMENTS: > > > 1. DID YOU ASSIGN THE OUTPUT OF "optim" to an object, like "est <- > optim(...)"? If yes and if "optim" terminated normally, the 60,000+ > paramters should be there as est$par. See the documentation on "optim". > > >

Re: [R] Very slow optim()

2021-03-12 Thread Spencer Graves
TWO COMMENTS: 1. DID YOU ASSIGN THE OUTPUT OF "optim" to an object, like "est <- optim(...)"? If yes and if "optim" terminated normally, the 60,000+ paramters should be there as est$par. See the documentation on "optim". 2. WHAT PROBLEM ARE YOU TRYING TO SOLVE? I hope you will forg

Re: [R] Very slow optim()

2021-03-12 Thread J C Nash
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 ho

Re: [R] Very slow optim(): solved

2021-03-12 Thread Jeff Newmiller
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" wrote: >Dear list, >I am using optim() to estimate over 60 thousans of parameters, and use >the server to run the pro

Re: [R] Very slow optim(): solved

2021-03-12 Thread 毕芳妮 via R-help
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()? _

Re: [R] Very slow optim()

2011-07-15 Thread John C Nash
t; To: > Subject: Re: [R] Very slow optim() Message-ID: > Content-Type: text/plain; > charset="utf-8" > Hamazaki, Hamachan (DFG alaska.gov> writes: >> > >> > Dear list, >> > >> > I am using optim() function to MLE ~55 parameters, but it

Re: [R] Very slow optim(): solved

2011-07-14 Thread Mike Marchywka
> Date: Thu, 14 Jul 2011 12:44:18 -0800 > From: toshihide.hamaz...@alaska.gov > To: r-h...@stat.math.ethz.ch > Subject: Re: [R] Very slow optim(): solved > > After Googling and trial and errors, the major cause of optimization was not

Re: [R] Very slow optim(): solved

2011-07-14 Thread Hamazaki, Hamachan (DFG)
158 Cell: (907)440-9934 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ben Bolker Sent: Wednesday, July 13, 2011 12:21 PM To: r-h...@stat.math.ethz.ch Subject: Re: [R] Very slow optim() Hamazaki, Hamachan (DFG alaska.gov> write

Re: [R] Very slow optim()

2011-07-13 Thread aaron Greenberg
Why use a hammer when you need a wrench? Admb seems to be the best tool for the job. It has several slick interfaces with R. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-

Re: [R] Very slow optim()

2011-07-13 Thread Mike Marchywka
> > Hamazaki, Hamachan (DFG alaska.gov> writes: > > > > > Dear list, > > > > I am using optim() function to MLE ~55 parameters, but it is very slow to > converge (~ 25 min), whereas I can do > > the same in ~1 sec. using ADMB, and ~10 sec using MS EXCEL Solver. > > > > Are there any tricks to

Re: [R] Very slow optim()

2011-07-13 Thread Ben Bolker
Hamazaki, Hamachan (DFG alaska.gov> writes: > > Dear list, > > I am using optim() function to MLE ~55 parameters, but it is very slow to converge (~ 25 min), whereas I can do > the same in ~1 sec. using ADMB, and ~10 sec using MS EXCEL Solver. > > Are there any tricks to speed up? > > Are th

[R] Very slow optim()

2011-07-13 Thread Hamazaki, Hamachan (DFG)
Dear list, I am using optim() function to MLE ~55 parameters, but it is very slow to converge (~ 25 min), whereas I can do the same in ~1 sec. using ADMB, and ~10 sec using MS EXCEL Solver. Are there any tricks to speed up? Are there better optimization functions? Thanks Toshihide