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

st: Re: constraints

From   "Hannah Kewsberry" <>
Subject   st: Re: constraints
Date   Wed, 18 Sep 2002 13:51:03 +0000

Dear Sir,

I have tried to work on the similar template on mlogit as you have suggested but Stata has given me the response:'invalid syntax'. Could you kindly suggest where have I gone wrong?





Presuming that you are using linear regression,

g totearn = earn1 + earn2 + earn3
reg par e1 e2 e3 race status totearn

does this by substituting the constraint into the model. Alternatively,

cons def 1 earn1=earn2
cons def 2 earn1=earn3
cnsreg par e1 e2 e3 race status earn*, c(1 2)

Since you are applying two constraints to the coefficient vector (i.e. if you ran the unconstrained regression and tested earn1=earn2=earn3, you would be doing an F with 2 and ? d.f.), you must define two constraints.

MSN Photos is the easiest way to share and print your photos:

* For searches and help try:

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