>From Spencer Graves:
>However, for an equality constraint, I've had good luck by with an objective function
>that adds something like the
>following to my objective function: constraintViolationPenalty*(A%*%theta-c)^2, where
>"constraintViolationPenalty" is
>passed via "..." in a call to optim.
If A%*%theta>c, then log(c-A%*%theta) returns NA. if A%*%theta
However, for an equality constraint, I've had good luck by with an objective function that adds something like the following to my objective function:
constraintViolationPenalty*(A%*%theta-c)^2,
where "constraintViolati
On 8/9/04 4:52 PM, "Thomas Lumley" <[EMAIL PROTECTED]> wrote:
> On Mon, 9 Aug 2004, Kahra Hannu wrote:
>
>>> 1) constrOptim does not work in this case because it only fits inequality
>>> constraints, ie A%*%theta > = c
>> --- I was struggling with the same problem a
>>
On Mon, 9 Aug 2004, Spencer Graves wrote:
> Hi, Tom:
>
> Why is adding "a multiple of log(A*theta-c) to the objective
> function ... a really bad idea as a way of faking equality constraints"?
Because it is infinite everywhere on the feasible set: log(0)?
It's fine to add constraints to th
Hi, Tom:
Why is adding "a multiple of log(A*theta-c) to the objective
function ... a really bad idea as a way of faking equality constraints"?
I've used Lagrange multipliers on other occasions, but if computer
time is cheaper than the time to work out the Lagrange multiplier
approa
On Mon, 9 Aug 2004, Kahra Hannu wrote:
> >1) constrOptim does not work in this case because it only fits inequality
> >constraints, ie A%*%theta > = c
> --- I was struggling with the same problem a
> few weeks ago in the portfolio optimization context. You can impose
> e
> from Ingmar Visser:
>I would like to optimize a (log-)likelihood function subject to a number of
>linear constraints between parameters. These constraints are equality
>constraints of the form A%*%theta=c, ie (1,1) %*% 0.8,0.2)^t = 1 meaning
>that these parameters should sum to one. Moreover, th
Hello All,
I would like to optimize a (log-)likelihood function subject to a number of
linear constraints between parameters. These constraints are equality
constraints of the form A%*%theta=c, ie (1,1) %*% 0.8,0.2)^t = 1 meaning
that these parameters should sum to one. Moreover, there are bounds