Better answer:
http://www.stata.com/support/faqs/stat/intconst.html
Also, you just have one fewer parameter than you thought, e.g. b1, b2, 1 - b1 - b2, not b1, b2, b3.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: 11 August 2008 18:11
To: [email protected]
Subject: st: RE: Constrained regression
Constraints in Stata mean linear constraints. Inequalities don't qualify.
As I understand it your coefficients can't be arbitrarily positive or zero and yet still sum to 1. Each must also be between 0 and 1.
That last is sometimes met by reparameterising in terms of the logit. Nevertheless, the question of implementing the last constraint still remains.
Nick
[email protected]
H�chle, Daniel
I would like to estimate regression model
y_t = a1*x1_t + a2*x2_t + ... ak*xk_t + e_t
with the following constraints:
a1>=0
a2>=0
...
ak>=0
a1 + a2 + ... + ak = 1
I tried to use -cnsreg- and -nl- but somehow did not manage estimate the model.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/