similar to: scaling constant in optim("L-BFGS-B")

Displaying 20 results from an estimated 2000 matches similar to: "scaling constant in optim("L-BFGS-B")"

2007 Jan 10
2
problems with optim, "for"-loops and machine precision
Dear R experts, I have been encountering problems with the "optim" routine using "for" loops. I am determining the optimal parameters of several nested models by minimizing the negative Log-Likelihood (NLL) of a dataset. The aim is to find the model which best describes the data. To this end, I am simulating artificial data sets based on the model with the least number
2006 Aug 26
1
problems with loop
Dear all, I am trying to evaluate the optimisation behaviour of a function. Originally I have optimised a model with real data and got a set of parameters. Now I am creating simulated data sets based on these estimates. With these simulations I am estimating the parameters again to see how variable the estimation is. To this end I have written a loop which should generate a new simulated data
2008 May 23
1
maximizing the gamma likelihood
for learning purposes and also to help someone, i used roger peng's document to get the mle's of the gamma where the gamma is defined as f(y_i) = (1/gammafunction(shape)) * (scale^shape) * (y_i^(shape-1)) * exp(-scale*y_i) ( i'm defining the scale as lambda rather than 1/lambda. various books define it differently ). i found the likelihood to be n*shape*log(scale) +
2010 Jul 08
2
Using nlm or optim
Hello, I am trying to use nlm to estimate the parameters that minimize the following function: Predict<-function(M,c,z){ + v = c*M^z + return(v) + } M is a variable and c and z are parameters to be estimated. I then write the negative loglikelihood function assuming normal errors: nll<-function(M,V,c,z,s){ n<-length(Mean) logl<- -.5*n*log(2*pi) -.5*n*log(s) -
2012 Oct 05
2
problem with convergence in mle2/optim function
Hello R Help, I am trying solve an MLE convergence problem: I would like to estimate four parameters, p1, p2, mu1, mu2, which relate to the probabilities, P1, P2, P3, of a multinomial (trinomial) distribution. I am using the mle2() function and feeding it a time series dataset composed of four columns: time point, number of successes in category 1, number of successes in category 2, and
2012 Jul 05
3
Maximum Likelihood Estimation Poisson distribution mle {stats4}
Hi everyone! I am using the mle {stats4} to estimate the parameters of distributions by MLE method. I have a problem with the examples they provided with the mle{stats4} html files. Please check the example and my question below! *Here is the mle html help file * http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html http://stat.ethz.ch/R-manual/R-devel/library/stats4/html/mle.html
2011 Oct 17
1
simultaneously maximizing two independent log likelihood functions using mle2
Hello, I have a log likelihood function that I was able to optimize using mle2. I have two years of the data used to fit the function and I would like to fit both years simultaneously to test if the model parameter estimates differ between years, using likelihood ratio tests and AIC. Can anyone give advice on how to do this? My likelihood functions are long so I'll use the tadpole
2019 Apr 24
1
Bug in "stats4" package - "confint" method
Dear R developers, I noticed a bug in the stats4 package, specifically in the confint method applied to ?mle? objects. In particular, when some ?fixed? parameters define the log likelihood, these parameters are stored within the mle object but they are not used by the ?confint" method, which retrieves their value from the global environment (whenever they still exist). Sample code: >
2004 Jan 05
3
optim function : "BFGS" vs "L-BFGS-B"
Dear kind R-experts. Does anybody have an experience to use optim function? If yes, what is the main difference between two method "BFGS" vs "L-BFGS-B"? I used "BFGS" method and got what I wanted. But when I used "L-BFGS-B" the error message said that "L-BFGS-B needs finite values of fn". So that means "BFGS" method can handle even if fn
2008 Apr 15
1
disturbing seed dependence in optim L-BFGS-B method
The the use of optim with the L-BFGS-B method for the following simple function gives erroneous results. Any help appreciated! Best, Bob Reilly # Code: V=function(p){ p1=p[1];p2=p[2] y=p1*p2-.4*(p1+p2) return(-y)} p=c(.2,.2) # p=c(.8,.8) max=optim(p,V,method = "L-BFGS-B",lower=c(0,0),upper=c(1,1)) max1=optim(max$par,V,method = "L-BFGS-B",lower=c(0,0),upper=c(1,1))
2016 Oct 10
0
optim(…?=, =?utf-8?Q?method=‘L-BFGS-B’) stops with an error message while violating the lower bound
>>>>> Spencer Graves <spencer.graves at prodsyse.com> >>>>> on Sat, 8 Oct 2016 18:03:43 -0500 writes: [.............] > 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) > 'Remark on ?Algorithm 778:
2011 May 25
1
L-BFGS-B and parscale in optim()
Hi, When using method L-BFGS-B along with a parscale argument, should the lower and upper bounds provided be on the scaled or unscaled values? Thanks. Cheers, -- Seb
2016 Oct 08
0
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi Spencer: See the link below about L-BFGS-B below because I had problems with it a good while back (and I think the link description is the cause but I can't prove it ) so eventually I moved to the Rvmmin(b) package. It's a package but really an algorithm. Rvmmin(b) uses a variable-metric algorithm similar to that of L-BFGS-B but without the problem below. It's not surprisingly a
2007 Jul 30
1
stop criteria when "L-BFGS-B needs finite values of 'fn' " in optim
Hi all! I'm running some simulations and I need to estimate some paramaters with optim( ), in some cases optim stops with the next message: "L-BFGS-B needs finite values of 'fn' " I would like to know how to include and "if" condition when this happen, could it be something like: myfun <- optim(....) # run my function
2019 May 03
0
R optim(method="L-BFGS-B"): unexpected behavior when working with parent environments
On 02/05/2019 21:35, Florian Gerber wrote: > Dear all, > > when using optim() for a function that uses the parent environment, I > see the following unexpected behavior: > > makeFn <- function(){ > ??? xx <- ret <- NA > ??? fn <- function(x){ > ?????? if(!is.na(xx) && x==xx){ > ?????????? cat("x=", xx, ", ret=", ret, "
2004 Jun 23
1
How to define stopping criterium for Optim with L-BFGS-B
Hi, I am using optim with a L-BFGS-B method to minimize a function. As I've understood, the way to specify a tolerance for stopping optimization is through "factr" argument. My function, is by construction, minimal when equal to 1. I wonder if there is any way to pass this info to "optim". If not, how "factr" argument works (I am quite confused about the
2016 Oct 08
0
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Have you tried "optimx" package that John Nash and I wrote? The main purpose is to be able to readily compare multiple optimizers on a particular class of problems and see which one seems to do the best. It doesn't include nloptr, but most other optimizers are there. Ravi ________________________________________ From: R-devel <r-devel-bounces at r-project.org> on behalf of
2008 Sep 28
0
constrained logistic regression: Error in optim() with method = "L-BFGS-B"
Dear R Users/Experts, I am using a function called logitreg() originally described in MASS (the book 4th Ed.) by Venebles & Ripley, p445. I used the code as provided but made couple of changes to run a 'constrained' logistic regression, I set the method = "L-BFGS-B", set lower/upper values for the variables. Here is the function, logitregVR <- function(x, y, wt =
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.
2007 Feb 23
1
optim(method="L-BFGS-B") abnormal termination
Hi, my call of optim() with the L-BFGS-B method ended with the following error message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH Further tracing shows: Line search cannot locate an adequate point after 20 function and gradient evaluations final value 0.086627 stopped after 7 iterations Could someone pls tell me whether it is possible to increase the limit of 20 evaluations? Is it even worth