---------- Forwarded message ---------- From: *Anusha Kothapalli* <akothapa at umass.edu> Date: Wednesday, March 23, 2016 Subject: question on constrOptim To: R-core at r-project.org To Whom It May Concern, We are using constrOptim to maximize a log likelihood function. The constrOptim call returns values, however, they are *exactly identical* to the initial values we input. Our ci, ui, gradient, etc. match the requirements for use of this function. So we are out of ideas. Would you happen to know how to make constrOptim run multiple iterations and/or return values that aren't equal to our initial values? Any input you have would be greatly appreciated! Thanks :) [[alternative HTML version deleted]]
On 24/03/2016 8:13 AM, Anusha Kothapalli wrote:> ---------- Forwarded message ---------- > From: *Anusha Kothapalli* <akothapa at umass.edu> > Date: Wednesday, March 23, 2016 > Subject: question on constrOptim > To: R-core at r-project.org > > > To Whom It May Concern, > > We are using constrOptim to maximize a log likelihood function. The > constrOptim call returns values, however, they are *exactly identical* to > the initial values we input. Our ci, ui, gradient, etc. match the > requirements for use of this function. So we are out of ideas. Would you > happen to know how to make constrOptim run multiple iterations and/or > return values that aren't equal to our initial values? > Any input you have would be greatly appreciated!Modify your objective function to print out the arguments it is given and the result it produces. You'll likely see something wrong when you look at those. If you still can't figure out the problem, simplify things enough to post to R-help, and post it there. It needs to be in a form that someone else can run. (Don't email it just to me, send it to the list.) Duncan Murdoch
You are unlikely to get help on this without a reproducible example. One obvious possibility is that those values are already optimal. Another is that you are not invoking the optimization properly. -- Sent from my phone. Please excuse my brevity. On March 24, 2016 5:13:35 AM PDT, Anusha Kothapalli <akothapa at umass.edu> wrote:>---------- Forwarded message ---------- >From: *Anusha Kothapalli* <akothapa at umass.edu> >Date: Wednesday, March 23, 2016 >Subject: question on constrOptim >To: R-core at r-project.org > > >To Whom It May Concern, > >We are using constrOptim to maximize a log likelihood function. The >constrOptim call returns values, however, they are *exactly identical* >to >the initial values we input. Our ci, ui, gradient, etc. match the >requirements for use of this function. So we are out of ideas. Would >you >happen to know how to make constrOptim run multiple iterations and/or >return values that aren't equal to our initial values? >Any input you have would be greatly appreciated! > >Thanks :) > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.[[alternative HTML version deleted]]