"Optimx Package" Error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

"Optimx Package" Error

nserdar
estimate<- optimx(init.par,Linn,gr=NULL,method= "L-BFGS-B", hessian=TRUE, control = list(trace=1),lower=c(0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
fn is  Linn
Function has  10  arguments
par[ 1 ]:  0   <? 0   <? 1     In Bounds          
par[ 2 ]:  0   <? 0   <? 1     In Bounds   In Bounds          
par[ 3 ]:  0   <? 0   <? 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,  :
  Cannot evaluate function at initial parameters

Please let me know how to deal with this problem.

Regards,
Serdar
Reply | Threaded
Open this post in threaded view
|

Re: "Optimx Package" Error

Jeff Newmiller
This is operator error. Do not attempt to optimize over an infinite range.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

nserdar <[hidden email]> wrote:

>estimate<- optimx(init.par,Linn,gr=NULL,method= "L-BFGS-B",
>hessian=TRUE,
>control =
>list(trace=1),lower=c(0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf))
>fn is  Linn
>Function has  10  arguments
>par[ 1 ]:  0   <? 0   <? 1     In Bounds          
>par[ 2 ]:  0   <? 0   <? 1     In Bounds   In Bounds          
>par[ 3 ]:  0   <? 0   <? 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,  :
>  Cannot evaluate function at initial parameters
>
>Please let me know how to deal with this problem.
>
>Regards,
>Serdar
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Optimx-Package-Error-tp4645669.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: "Optimx Package" Error

nserdar
Sorry but I don't understand what your opinion.

"Also try this initial values : ( 0.5, 0.5, 0.5, 1 ,1,1,1,1,1,1)

Then I got same error.

Regards,
Serdar