# [R] "optim" and "nlminb"

nserdar snes1982 at hotmail.com
Thu Oct 11 22:16:02 CEST 2012

```I have already try "optimx" but I got this error message. How to solve it.

fn is  Linn
Function has  10  arguments
par[ 1 ]:  0   <? 0.5   <? 1     In Bounds
par[ 2 ]:  0   <? 0.5   <? 1     In Bounds   In Bounds
par[ 3 ]:  0   <? 0.5   <? 1     In Bounds   In Bounds   In Bounds
par[ 4 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds
par[ 5 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds   In Bounds
par[ 6 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds   In Bounds   In Bounds
par[ 7 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds   In Bounds   In Bounds   In Bounds
par[ 8 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds   In Bounds   In Bounds   In Bounds   In Bounds
par[ 9 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds   In Bounds   In Bounds   In Bounds   In Bounds   In Bounds
par[ 10 ]:  -Inf   <? 1   <? Inf     In Bounds   In Bounds   In Bounds   In
Bounds   In Bounds   In Bounds   In Bounds   In Bounds   In Bounds   In
Bounds
Error in optimx(init.par, Linn, gr = NULL, method = "L-BFGS-B", hessian =
TRUE,  :
Function provided is not returning a scalar number

Regards,
Serdar

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

```