It appears you are using the approach "throw every method at a problem and 
select the
answer you like". I use this quite a lot with optimx to see just what disasters 
I can
create, but I do so to see if the software will return sensible error messages.

You will have to provide a reproducible example if you want useful answers from 
this list
(as per posting guide). Optimization tools are like F1 racing cars -- many 
controls and
settings, with lots of power but difficulties in controlling it. Their users -- 
even if
well-qualified in other areas -- are unfortunately often those who have trouble 
riding a
bicycle with just one speed. There is a serious and quite involved learning 
curve.

Previously you tried optimx, but seem to have misunderstood or disregarded the 
answers. It
is quite likely the problem you are sending to the optimizers is ill-posed or 
plain wrong.
Certainly it does not have a gradient function, which is almost always a good 
idea. If you
prepare a reproducible example that can be run by readers of the list you will
  a) discover what is wrong as you prepare it, or
  b) be able to submit and very likely get useful help.

Indeed in several years on the list, I've never seen a query with a short, 
testable case
fail to get an answer very quickly.

JN


On 10/11/2012 06:00 AM, r-help-requ...@r-project.org wrote:
> Message: 92
> Date: Wed, 10 Oct 2012 13:16:38 -0700 (PDT)
> From: nserdar <snes1...@hotmail.com>
> To: r-help@r-project.org
> Subject: [R] "optim" and "nlminb"
> Message-ID: <1349900198210-4645772.p...@n4.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> #optim package
> estimate<-optim(init.par,Linn,hessian=TRUE, method=c("L-BFGS-B"),control =
> list(trace=1,abstol=0.001),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
> 
> #nlminb package
> estimate<-nlminb(init.par,Linn,gr=NULL,hessian=TRUE,control =
> list(trace=1,factr=1),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
> 
> I did not get same results from above equations. Log-likelihood values are
> close but parameter estimation completely different. 
> 
> My expectation is very close to "nlminb" packages.
> 
> Do you have any idea and suggestion between packages?
> 
> Regards,
> Serdar 
>

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to