Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Inequality constraints and quadratic programming


From   Matt Dobra <[email protected]>
To   [email protected]
Subject   st: Inequality constraints and quadratic programming
Date   Thu, 29 Jul 2004 04:33:17 -0400

Dear Statalisters,

Is there a way to estimate a quadratic programming model in Stata using both inequality and equality constraints on the estimated coefficients?
I am trying to estimate:

y=b1x1+b2x2+e
s.t.
(1) b1+b2=1
(2) 0<=b1<=1
(3) 0<=b2<=1

As an aside, it is simple enough to estimate a cnsreg model with only the first constraint...Now, my intuition is telling me that in this particular case:

a) if OLS using only the first constraint yields b1 and b2 between 0 and 1, then the other two constraints are non-binding so the estimates from a regression using just the first constraint should be the same as a regression using all three.

b) if OLS using only the first constraint yields (say) b1<0 and b2>1, then the best fit for a regression using all three constraints should be b1=0 and b2=1.
Admittedly, my intuition on these matters has a very large error term and is often biased, which is likely compounded in this case by the fact that my knowledge of quadratic programming is limited. Any comments on either the initial question or my (likely erroneous) intuition would be greatly appreciated!

Thanks,

Matt

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index