similar to: question on OPTIMX with installing and using

Displaying 20 results from an estimated 500 matches similar to: "question on OPTIMX with installing and using"

2010 Jun 22
1
Subject: Re ZINB by Newton Raphson??
I have not included the previous postings because they came out very strangely on my mail reader. However, the question concerned the choice of minimizer for the zeroinfl() function, which apparently 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
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", >
2010 Apr 03
0
Restricting optimisation algorithm's parameter space
> I have a problem. I am using the NLME library to fit a non-linear model. There is a linear component to the model that has a couple parameter values that can only be positive (the coefficients are embedded in a sqrt). When I try and fit the model to data the search algorithm tries to see if a negative value for one of these parameter values will produce an optimal fit. When it does so,
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
2010 Oct 15
2
using optimize with two unknowns, e.g. to parameterize a distribution with given confidence interval
Hi, I would like to write a function that finds parameters of a log-normal distribution with a 1-alpha CI of (x_lcl, x_ucl): However, I don't know how to optimize for the two unknown parameters. Here is my unsuccessful attempt to find a lognormal distribution with a 90%CI of 1,20: prior <- function(x_lcl, x_ucl, alpha, mean, var) { a <- (plnorm(x_lcl, mean, var) - (alpha/2))^2 b
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
2016 Oct 09
1
optim(?, method=?L-BFGS-B?) stops with an error
I'll not copy all the previous material on this thread to avoid overload. The summary is that all the methods Spencer has tried have some issues. The bad 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
2010 Sep 21
5
Can ucminf be installed in 64 bit R and one more question?
Hey, R Users my windows is 64 bit windows 7.?I am trying to install the package ucminf into my 64 bit version R but cannot.??the package I downloaded is from http://cran.r-project.org/web/packages/ucminf/index.html?and I installed it with the "install from local zip files", due to I did not connect my computer to internet. did anyone meet this problem and is there a version of
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! ----------------------------------------------------------------- So, I checked and checked my gradient function line by
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 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
2012 Jun 09
0
R-devel Digest, Vol 112, Issue 8
I'll not be able to comment on the use of C like this, but will warn that I wrote the routines that became Nelder-Mead, CG, and BFGS in optim() in the mid 1970s. CG never did as well as I would like, but the other two routines turned out pretty well. However, in nearly 40 years, there are a few improvements, particularly in handling bounds and masks (fixed parameters). For all-R routines see
2012 Jun 25
0
R-help Digest, Vol 112, Issue 25
While lm() is a linear modeling, the constraints make it easier to solve with a nonlinear tool. Both my packages Rvmmin and Rcgmin (I recommend the R-forge versions as more up-to-date) have bounds constraints and "masks" i.e., fixed parameters. I am actually looking for example problems of this type that are more recent than the ones that got me into this 30 years ago. Do contact me
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, Ravi.
2013 Oct 09
1
Version of L-BFGS-B used in optim etc
Hi. I just noticed the paper by Morales and Nocedal Remark on "Algorithm 778: L-BFGS-B: Fortran Subroutines for Large-Scale Bound Constrained Optimization". TOMS 2011; 38(1): 7 http://www.ece.northwestern.edu/~morales/PSfiles/acm-remark.pdf which describes a couple of improvements (speed and accuracy) to the original Netlib code which AFAICT is that still used by optim() via f2c.
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
2010 Nov 16
4
DBLEPR?
Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional (but not reproducible) errors, seemingly on Windows only. There is some suspicion that its use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the archives, though it is in the R FAQ
2010 Nov 16
4
DBLEPR?
Ravi Varadhan and I have been looking at UCMINF to try to identify why it gives occasional (but not reproducible) errors, seemingly on Windows only. There is some suspicion that its use of DBLEPR for finessing the Fortran WRITE() statements may be to blame. While I can find DBLEPR in Venables and Ripley, it doesn't get much mention after about 2000 in the archives, though it is in the R FAQ
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x) (1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x) To smooth out the noise, define another
2010 Sep 07
5
question on "optim"
Hey, R users I do not know how to describe my question. I am a new user for R and write the following?code for a dynamic labor economics?model and use OPTIM to get optimizations and parameter values. the following code does not work due to the?equation: ?? wden[,i]<-dnorm((1-regw[,i])/w[5])/w[5] where w[5]?is one of the parameters (together with vector a, b and other elements in vector