search for: optimx

Displaying 20 results from an estimated 92 matches for "optimx".

Did you mean: optim
2011 Aug 29
3
gradient function in OPTIMX
Dear R users When I use OPTIM with BFGS, I've got a significant result without an error message. However, when I use OPTIMX with BFGS( or spg), I've got the following an error message. ---------------------------------------------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS", > control=list(maxit=10000)) Error: Gradient function mi...
2010 Sep 17
0
question on OPTIMX with installing and using
Dear R users I have tried to install the optimx but met problems. I have gone to the website you suggested: https://r-forge.r-project.org/R/?group_id=395 and tried to install it with the following method: install.packages("optimx", repos="http://R-Forge.R-project.org") I have received the following information: package...
2017 Dec 31
1
Order of methods for optimx
Dear R-er, For a non-linear optimisation, I used optim() with BFGS method but it stopped regularly before to reach a true mimimum. It was not a problem with limit of iterations, just a local minimum. I was able sometimes to reach better minimum using several rounds of optim(). Then I moved to optimx() to do the different optim rounds automatically using "Nelder-Mead" and "BFGS" methods I find a huge time difference using system.time() based on the order of these both methods: > snb # "Nelder-Mead" and "BFGS" ??? user?? system? elapsed 1021.656??...
2011 Aug 29
0
Error: Gradient function might be wrong ----- in OPTIMX
Dear R users When I use OPTIMX with BFGS, I've got the following error message. ----------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS") Error: Gradient function might be wrong - check it! -------------------------------------------------------...
2011 Dec 12
1
Detecting typo in function argument
With some chagrin after spending a couple of hours trying to debug a script, I realized I had typed in something like ans<-optimx(start, myfn, mygr, lower<-lo, upper=up) that is, the "<-" rather than "=". The outcome on my machine was a non-obvious error several layers deep in the call stack. For info, optim() seems to stop much more quickly. The error is "obvious", but I'm wondering...
2011 Aug 13
3
optimization problems
Dear R users I am trying to use OPTIMX(OPTIM) for nonlinear optimization. There is no error in my code but the results are so weird (see below). When I ran via OPTIM, the results are that Initial values are that theta0 = 0.6 1.6 0.6 1.6 0.7. (In fact true vales are 0.5,1.0,0.8,1.2, 0.6.) ----------------------------------------------...
2011 Aug 31
1
Gradients in optimx
Hi Reuben, I am puzzled to note that the gradient check in "optimx" does not work for you. Can you send me a reproducible example so that I can figure this out? John - I think the best solution for now is to issue a "warning" rather than an error message, when the numerical gradient is not sufficiently close to the user-specified gradient. Best,...
2011 Sep 10
1
control list gotcha
This is mainly a reminder to others developing R packages to be careful not to supply control list items that are not used by the called package. Optimx is a wrapper package that aims to provide a common syntax to a number of existing optimization packages. Recently in extending optimx package I inadvertently introduced a new control for optimx which is NOT in any of the wrapped optimization packages. There are probably other methods of keeping thi...
2011 Feb 06
1
function optimization
Dear all, this is my first time, and just begin to use R. But I've a question about optimization using optimx library. It could sound stupid by I'm a bit affraid with the problem, because anything I try, anything Error. The procedure was: optimx(par="10,71,1",fn=(Prey*Provisioning)/Risk, control=list("maximize)) well the problem lies in the initial value parameters, again and again, R...
2011 Nov 29
2
Parameters setting in functions optimization
Good afternoon everybody, I'm quite new in functions optimization on R and, whereas I've read lot's of function descriptions, I'm not sure of the correct settings for function like "optimx" and "nlminb". I'd like to minimize my parameters and the loglikelihood result of the function. My parameters are a mean distance of dispersion and a proportion of individuals not assigned, coming from very far away. The function LikeGi reads external tables and it's workin...
2019 Jan 31
1
nlminb with constraints failing on some platforms
Prof Nash, Prof Galanos Is it possible to use a generic code stub in front of packages that use optimx to improve optimx use or curtail it according to the requirements? Best Regards Amit +91 7899381263 ________________________________________________________________________ Please request Skype as available 5th Year FPM (Ph.D.) in Finance and Accounting Area Indian Institute of M...
2016 Oct 09
1
optim(?, method=?L-BFGS-B?) stops with an error
...ad news: This is not uncommon with optimization methods, in part because the problems are "hard", in part because getting them implemented and linked to an interfacing approach like R is very tedious and prone to omissions and errors. The good news: I've been working on a revision to optimx, having noted the implementation issues just mentioned. There is now a package optimr on CRAN, but that's just to reserve the name. The real package is optimrx on R-forge (dependencies can fail, then the poor maintainer gets "your package doesn't work", with no hope of fixing it)....
2011 Nov 02
1
overly long lines in pdf output of manual from package
In re-factoring my optimx package, I'm finding that the pdf output has some lines that are outside the margins (and there are warnings in R CMD check optimx). Clearly I can fix this by editing the tex file that is generated, but the build infrastructure would still get things wrong in automatic processing. So that gives...
2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
...ently allows any of the current 6 methods of optim() for this purpose. The original poster wanted to use Newton-Raphson. Newton-Raphson (or just Newton for simplicity) is commonly thought to be the "best" way to approach optimization problems. I've had several people ask me why the optimx() package (see OptimizeR project on r-forge -- probably soon on CRAN, we're just tidying up) does not have such a choice. Since the question comes up fairly frequently, here is a response. I caution that it is based on my experience and others may get different mileage. My reasons for being...
2012 Feb 03
0
Scaling in optimization
...qual magnitudes near the > solution. This apparently isn't possible with nlminb, but you could try > optimizer="optim" (the default), method="L-BFGS-B" and see how you do > (although L-BFGS-B is often a bit finicky). Alternatively, you can try > optimizer="optimx", in which case you have a larger variety of > unconstrained optimizers to choose from (you have to install the optimx > package and take a look at its documentation). Alternatively, you can > scale your input variables (e.g. use scale() on your input matrix to get > zero-centered...
2011 Jul 23
1
Extend my code to run several data at once.
Hi I have a code that calculate maximisation using optimx and it is working just fine. I want to extend the code to run several colomns of R_j where j runs from 1 to 200. If I am to run the code in its current state, it means I will have to run it 200 times manually. May you help me adjust it to accomodate several rows of R_j and print the 200 results. *...
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi, Mark et al.: Thanks, Mark. Three comments: 1. Rvmmin was one of the methods I tried after Ravi directed me to optimx. It returned NAs for essentially everything. See my email of this subject stamped 4:43 PM Central time = 21:43 UTC. 2. It would be interesting to know if the current algorithm behind optim and optimx with method='L-BFGS-B' incorporates Morales and Nocedal (2011) 'Rem...
2015 Apr 24
2
Title case in DESCRIPTION for package where a word is a function name
I was preparing a fix for a minor glitch in my optimx package and R CMD check gave an error that the title was not in title case. It is A Replacement and Extension of the optim() Function R CMD check suggests the incorrect form A Replacement and Extension of the Optim() Function 'Writing R Extensions' suggests single quotes, i.e., A Repla...
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hello: The development version of Ecdat on R-Forge contains a vignette in which optim(?, method=?L-BFGS-B?) stops with an error message while violating the lower bound. To see all the details, try the following: install.packages("Ecdat", repos="http://R-Forge.R-project.org") Then do "help(pac=Ecdat)" -> "User guides, package
2012 Jan 12
2
Function accepted by optim but not mle2 (?)
Dear Sir/ Madam, I'm having trouble de-bugging the following - which works perfectly well with optim or optimx - but not with mle2. I'd be really grateful if someone could show me what is wrong. Many thanks in advance. JSC: gompertz<- function (x,t=data) { a3<-x[1] b3<-x[2] shift<-data[1] h.t<-a3*exp(b3*(t-shift)) S.t<-exp(a3/b3*(1-exp(b3*(t-shi...