On Dec 28, 2003, at 2:33 AM, Richard wrote:
Anyway, I think you could do something like the following, using the
-est-
and -lrtest- commands. The idea is you run the unconstrained model and
store the results. Then, you create a new var which is the sum of the
2
vars you want to constrain to be equal. Then, run a 2nd regression
using
this new var instead of the 2 original vars; this is the constrained
model. Then run lrtest to see whether the difference between
constrained
and unconstrained is significant. Somebody can correct me if I am
doing
this wrong or let us know if there is a better alternative. (I'm using
Stata 8 here.)
An alternative that does not require you to do any transformation of
the data:
webuse auto
constr def 1 price=weight
cnsreg mpg price weight, c(1)
est store constr
reg mpg price weight
lrtest constr, force
Kit
*
* 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/