[R] "optim" and "nlminb"

nserdar snes1982 at hotmail.com
Wed Oct 10 22:16:38 CEST 2012


#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 




--
View this message in context: http://r.789695.n4.nabble.com/optim-and-nlminb-tp4645772.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list