Re: [R] 'initial value not feasible' in constrOptim

2007-09-08 Thread Ingmar Visser
Hi,

On Sep 7, 2007, at 11:00 PM, Yuchen Luo wrote:
 constrOptim(c(0.5,0.3,0.5), fit.error, fit.error.grr,  
 ui=-1*ui,ci=-1*ci)

 and I am confronted with error message initial value not feasible

 I plug in the initial value of (0.5,0.3,0.5) to function fit.error and
 fit.error.grr and have pretty reasonable result.

That doesn't mean the constraint is satisfied, which depends on the  
values of ui and ci
but they are not provided so it's hard to tell where the problem is.

hth, Ingmar

 I inequality ui %*% theta
 - ci = 0 as suggested in the R manual and it is satisfied. In  
 case that
 this is a typo of the manual, I let ui=-ui and ci=-ci and try  
 constrOptim
 again but the same warning message pops up.
 Could you please point me a way out of this?

 I am actually trying to translate a fortran code to R and the  
 function I
 want to replace is DBCPOL, which used 'the complex method  
 described in
 Nelder and Mead (1965) and Gill et al. (1981). I believe contrOptim is
 better than it because it is newer, is it?

 Best Wishes
 Yuchen Luo

   [[alternative HTML version deleted]]

 __
 R-help@stat.math.ethz.ch 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.

__
R-help@stat.math.ethz.ch 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.


[R] 'initial value not feasible' in constrOptim

2007-09-07 Thread Yuchen Luo
Dear friends.
I am using function

constrOptim(c(0.5,0.3,0.5), fit.error, fit.error.grr, ui=-1*ui,ci=-1*ci)

and I am confronted with error message initial value not feasible

I plug in the initial value of (0.5,0.3,0.5) to function fit.error and
fit.error.grr and have pretty reasonable result. I inequality ui %*% theta
- ci = 0 as suggested in the R manual and it is satisfied. In case that
this is a typo of the manual, I let ui=-ui and ci=-ci and try constrOptim
again but the same warning message pops up.
Could you please point me a way out of this?

I am actually trying to translate a fortran code to R and the function I
want to replace is DBCPOL, which used 'the complex method described in
Nelder and Mead (1965) and Gill et al. (1981). I believe contrOptim is
better than it because it is newer, is it?

Best Wishes
Yuchen Luo

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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.