[R] linear constraint optim with bounds/reparametrization

Spencer Graves spencer.graves at pdf.com
Mon Aug 9 18:45:47 CEST 2004


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 
approach, why is it a bad idea to add violation of constraints to the 
objective function?  I've done it myself in the past and have gotten 
what looked like sensible results. 

      Best Wishes,
      spencer graves

Thomas Lumley 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
>>few weeks ago in the portfolio optimization context. You can impose
>>equality constraints by using inequality constraints >= and <=
>>simultaneously. See the example bellow.
>>
>>    
>>
>
>Ick. You do not want to use constrOptim for equality constraints.
>constrOptim is a log-barrier interior-point method, meaning that it adds
>a multiple of log(A%*%theta-c) to the objective function. This is a really
>bad idea as a way of faking equality constraints.
>
>Use Lagrange multipliers and optim.
>
>	-thomas
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>  
>




More information about the R-help mailing list