Hello,
Assume one has a regression of the kind:
DEPVAR = B1*Y1 + B2*Y2 + errors
which is run in RATS as follows:
linreg(noprint) DEPVAR start end
# Y1 Y2
Now, I want to impose a constraint on B1 and B2 so that B1+B2 is equal or less than 1 ?
How do I do that ??????
Many thanks for your help !
V.
How to impose convexity constraint to regression coeffs ?
Re: How to impose convexity constraint to regression coeffs ?
If that's all you're trying to do, it's very simple:
1. Run the original regression. Check the sum of the coefficients. If it's <= 1, you're done.
2. If it's bigger than one, run the regression imposing the restriction that the coefficients sum to one. The simplest way to do that is to follow the original regression with
With many restrictions, it's not as simple to do a check of the boundary. You would need use LQPROG to impose the constraints. There's an example of that in section 12.5 of the User's Guide.
1. Run the original regression. Check the sum of the coefficients. If it's <= 1, you're done.
2. If it's bigger than one, run the regression imposing the restriction that the coefficients sum to one. The simplest way to do that is to follow the original regression with
Code: Select all
RESTRICT(CREATE) 1
# 1 2
# 1.0 1.0 1.0