similar to: constrOptim converging not to the optimal values

Displaying 20 results from an estimated 200 matches similar to: "constrOptim converging not to the optimal values"

2008 May 12
1
hessian in constrained optimization (constrOptim)
Dear helpers, I am using the function "constrOptim" to estimate a model with ML with an inequality constraint using the option method='Nelder-Mead'. When I specify the option: hessian = TRUE I obtain the response: Error in f(theta, ...) : unused argument(s) (hessian = TRUE) I guess the function "constrOptim" does not allow this argument which, on the other hand, is
2011 Dec 29
0
problem of "constrOptim.nl", no hessian and convergence values
Dear Helper, I used "constrOptim.nl" and got the value of par. The estimations looks good even if the number of iterations is only 16. But the values of hessian and convergence are both "NULL". I tested the objective function and gradient function by "optim" and didn't see any problem there. With these functions, "optim" gives the convergence value
2011 Dec 29
0
problem of "constrOptim.nl", no hessian and convergence
Hi, Use the `auglag' function in "alabama" if you want to get the Hessian at convergence. This typically tends to perform better than `constrOptim.nl'. Also, `constrOptim.nl' does not compute the Hessian. You should not specify method="L-BFGS-B". The default method "BFGS" is better in this setting. Hope this helps, Ravi
2003 Oct 31
1
help with constrOptim function
Hello. I had previously posted a question concerning the optimization of a nonlinear function conditional on equality constraints. I was pointed towards the contrOptim function. However, I do not understand the syntax of this function with respect to specifying the constraints and so I don’t know if it is what I need. The command is: constrOptim(theta, f, grad,ui,ci,…). “theta” is the
2007 Sep 07
1
'initial value not feasible' in constrOptim
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
2006 Oct 06
1
Relative constraint using constrOptim?
I am trying to optimize a likelihood function using constrOptim. I know from prior research that, e.g. x1>x2. Is there a way to include that constraint into the optimization routine, i.e. the ci constraint? The examples I found only use absolute numeric values for the constraint and not relative values. My attempts to include it into ci failed: e.g. ci=c(1, x[1]). Am I using the
2009 Mar 25
0
constrOptim workaround for "L-BFGS-B" or Box Constraints
This is not so much a question as a contribution, but comments are welcome. Comments: 1) thank you very much to Paul Smith in the post https://stat.ethz.ch/pipermail/r-help/2008-March/157249.html This is intended to build on that example with something more complex than a 2x2 set of constraints 2) "L-BFGS-B" does not appear to work in optimConst Problem: let's
2013 Sep 26
0
ConstrOptim Function (Related to Constraint Matrix/ui/ci error)
Hello All, I am stuck in the following problem. Cexpt=c(0,25,50,100,150,300,250,125,40) t=c(0,0.2,0.4,0.6,1,4,8,12,24) theta0= vector of 6 parms (My initial parameter) A=Constraint matrix (hopefully 6*6) B= Constraint vector of length 6) Cfit=function(t,theta){ J(t)=function(theta,t) Cfit=function(J(t),constant) return(Cfit) } loss=function(theta,t,Cexpt) {
2006 Feb 01
1
output hessian matrix in constrOptim
Hi, Is there any way to get the hessian matrix from the "constrOptim" function without supplying gradient function? Thanks. --------------------------------- Bring words and photos together (easily) with [[alternative HTML version deleted]]
2004 Apr 02
0
Hessian in constrOptim
Dear R-users, In the function constrOptim there is an option to get an approximation to the hessian of the surrogate function R at MLE by declaring hessian=TRUE in the calls to the function optim. I would like to ask if it is advisable to get an approximate hessian for the funcrion f as follows: f''(theta)=R''(theta|theta_k)-B''(theta) where
2012 Nov 29
0
constrOptim
Dear R users, I am using the function "constrOptim" to minimize the -1*log-likelihood where \beta_i>=0 i=1,...,p and \beta_0 is unconstrained. I construct u_i as 0 0 0 ... 0 0 1 0 ... 0 0 0 1 ... 0 . . . ... 0 . . . ... 0 .
2008 Jan 03
1
EQUALITY constraints in 'constrOptim'
Does anybody know to introduce EQUALITY constraints in 'constrOptim' function? BR, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2004 Apr 27
1
constrOptim does ineq, not eq, but who do ?
Hi everybody, please, could you give me help ? I scanned the help archives and didn't found hints... I want to solve a large sparse linear system subjected to an inequality constrains (all solutions positive) and an equality constrain (all solutions sum to 1), thus I tried to fool constrOptim using: x[1] + 0 + ... + 0 >= 0 ... 0 + 0 + ... + x[n] >= 0 x[1] + x[2] + ... +
2016 Apr 13
0
on the output of constrOptim()
Dear list, The following example of constrOptim() where the initial point is the solution shows that the component counts is not a two-element vector as documented in the man page. constrOptim(c(1,1), fr, grr, ui = diag(2), ci = c(0,0)) Does anyone have the same behavior? A possible solution is to put line 69 in constrOptim.R before the first possible break line 67. Regards, Christophe
2007 Aug 02
1
constraint in constrOptim
I'm using the function constrOptim together with the "SANN" method and my objective function (f) has two parameters. One of the parameters needs be into (2^(-10), 2^4) range and the other into (2^(-2), 2^12) range. How can I do it using constrOptim?? Thank you André Rossi Alertas do Yahoo! Mail em seu celular. Saiba mais em http://br.mobile.yahoo.com/mailalertas/
2003 Jan 17
1
supplying gradient to constrOptim()
Hi, I'm very interested in using the constrOptim() function currently in the R-devel sources. In particular, I'm trying to fit point process conditional intensity models via maximum likelihood. However, I noticed that the gradient of the objective function must be supplied for all but the Nelder-Mead method. I was wondering why this was because optim() itself does not require a gradient
2004 Nov 05
1
Code/doc inconsistancy in constrOptim (PR#7346)
Code in constrOptim() (R-2.0.0, package stats): if (any(ui %*% theta - ci <= 0)) stop("initial value not feasible") but the help page tells us in Section "Details": "The feasible region is defined by ui %*% theta - ci >= 0." Uwe Ligges --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os =
2004 Oct 05
1
constrOptim convergence
Hello, I got a question with the R function constrOptim. >From the R help, it says that the return values of "constrOptim" are the same as "optim". For the return value "convergence" of the function "optim", the values should be 0, 1, 10, 51 and 52. See http://www.maths.lth.se/help/R/.R/library/stats/html/optim.html When I use constrOptim, I get
2007 Aug 01
1
constrOptim
Hi, I'm having trouble using the constrOptim function to generate the 9-component vector argmin of the function ELfsds: ELfsds <- function(pvechat){ LG=0 for(i in 1:9){ LG=LG+log(pvechat[i]) } return(-LG) } with accompanying gradient function: gradfunc <- function(thetavec){ g=1/(9*thetavec) return(g) } The constraints on the optimization problem are: 1 - components of
2008 Jan 18
0
constrOptim with SANN
Hi Everyone, I'm trying to minimize a function using constrOptim with the simulated annealing method SANN. If I understand constrOptim well, it basically passes most of its arguments to optim while somehow enforcing the constraints. My problem is, that since SANN does not need gradients, when using optim with SANN, the gr argument of optim is used to specify a function to create the next