[R] OPTIMX: non-finite finite-difference value [26] and scaling problem

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Sat Jul 18 09:07:24 CEST 2015


It is quite unlikely that anyone can help you without a reproducible 
example. [1]

You should be aware that sending emails to this list in HTML format is 
likely to yield scrambled mails received. Please make your email client send 
email in plain text.

[1] 
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

On 07/17/2015 10:55 AM, Olu Ola via R-help wrote:
> Hello,I am running a nonlinear GMM using the optimx wrapper. I am trying to estimate 37 variables however and my code for the optimx is:
> nlgmm = optimx(par=b0, fn=obj,method = "BFGS", itnmax=10000, control=list(follow.on = TRUE,kkt=FALSE,starttests=TRUE,save.failures=TRUE, trace=0))
>
> My staring values are from Ordinary least squares estimates (OLS) and they are:
> b0 <- c(-2.00658,-0.04373,0.19079,0.34652,-0.36814,0.21284,-0.24369,0.64622,0.22927,0.29431,0.19547,0.80614,18.8398,0.5928,3.1375,0.4301,-0.4937,2.2016,31.5203,0.6171,1.0206,1.7830,-0.4421,11.0076,-0.03305,0.17087,0.44794,0.17488,0.10781,-0.50747,-0.04563,0.17030,0.41792,0.17526,0.99734,-17.2996,-41.9359)
>
> I got the following error:
> Error in optim(par = par, fn = ufn, gr = ugr, lower = lower, upper = upper,  :   non-finite finite-difference value [26]
> I also got an error about scaling which is as follows:
> Parameters or bounds appear to have differentscalings.This can cause poor performance in optimization.  Itis important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
>
>
> any help will be greatly appreciated.
> Best Regards
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>


-- 
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k



More information about the R-help mailing list