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

st: RE: Constrained multiple regressions


From   "Gustavo Sanchez" <[email protected]>
To   <[email protected]>
Subject   st: RE: Constrained multiple regressions
Date   Wed, 23 Feb 2005 08:30:38 -0600

Tumer ([email protected]) asked

>I have n equations:

> y(1)=alpha(1)+beta(1)*x(1)
> y(2)=alpha(2)+beta(2)*x(2)
> .
> .
> .
> y(n)=alpha(n)+beta(n)*x(n)

>  The theory says that beta(1)+beta(2)+...+beta(n)=0 should hold. So
>I need to estimate these equations together imposing the above
>constraint. According to help the files I must be able to do this
>with "sureg" and "constraint" commands. Imposing restrictions on
>constants seems fine but when I impose any restriction, like the
>one mentioned above, on any set of parameters other then the
>constants I get the message "redundant or inconsistent constraint".
>What can I be doing wrong? Is there any other way of doing this?
>Thank you all beforehand for any help.


Consider the model:

	price        = alpha1 + beta1*mpg
	displacement = alpha2 + beta2*rep78
	weight       = alpha3 + beta3*turn

	with the constraint beta1+beta2+beta3=0

Using the auto dataset we can use -sureg- and -constraint- to estimate the
model:

. clear

. sysuse auto
(1978 Automobile Data)

. constraint define 1 [price]mpg+[displacement]rep78+[weight]turn=0

. sureg (price mpg) (displacement rep78) (weight turn), c(1)

Seemingly unrelated regression

Constraints:
 ( 1)  [price]mpg + [displacement]rep78 + [weight]turn = 0
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
price              69      1    2666.103    0.1497      37.59   0.0000
displacement       69      1    84.46202    0.1657       4.78   0.0288
weight             69      1    405.2265    0.7349     189.30   0.0000
----------------------------------------------------------------------

----------------------------------------------------------------------------
--
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
--
price        |
         mpg |  -106.5862   17.38525    -6.13
0.000    -140.6607   -72.51175
       _cons |   8415.248    482.664    17.44   0.000     7469.244
9361.252
-------------+--------------------------------------------------------------
--
displacement |
       rep78 |  -32.82048   15.01316    -2.19
0.029    -62.24573   -3.395232
       _cons |   309.7799   53.54245     5.79   0.000     204.8386
414.7212
-------------+--------------------------------------------------------------
--
weight       |
        turn |   139.4067   10.13225    13.76   0.000     119.5478
159.2655
       _cons |  -2515.953   406.1126    -6.20
0.000    -3311.919   -1719.987
----------------------------------------------------------------------------
--

Sincerely,

-- Gustavo
[email protected]


*
*   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