Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Simple coefficient test across models
From
"Michael N. Mitchell" <[email protected]>
To
[email protected]
Subject
Re: st: Simple coefficient test across models
Date
Wed, 06 Oct 2010 19:33:17 -0700
Dear Garret
I wonder if this example does the trick...
. sysuse auto
(1978 Automobile Data)
. sureg (mpg weight) (mpg weight length)
Seemingly unrelated regression
----------------------------------------------------------------------
Equation Obs Parms RMSE "R-sq" chi2 P
----------------------------------------------------------------------
mpg 74 1 3.3921 0.6515 138.36 0.0000
2mpg 74 2 3.389422 0.6521 142.45 0.0000
----------------------------------------------------------------------
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mpg |
weight | -.0060087 .0005108 -11.76 0.000 -.0070099 -.0050075
_cons | 39.44028 1.592043 24.77 0.000 36.31994 42.56063
-------------+----------------------------------------------------------------
2mpg |
weight | -.0059477 .000561 -10.60 0.000 -.0070471 -.0048482
length | -.0022519 .0091207 -0.25 0.805 -.0201282 .0156244
_cons | 39.6792 1.843716 21.52 0.000 36.06559 43.29282
------------------------------------------------------------------------------
. lincom [mpg]weight - [2mpg]weight
( 1) [mpg]weight - [2mpg]weight = 0
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
(1) | -.000061 .0002617 -0.23 0.816 -.000574 .0004519
------------------------------------------------------------------------------
* Or you can use the -test- command...
. test [mpg]weight == [2mpg]weight
( 1) [mpg]weight - [2mpg]weight = 0
chi2( 1) = 0.05
Prob > chi2 = 0.8156
Hope this helps,
Michael N. Mitchell
Data Management Using Stata - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week - http://www.MichaelNormanMitchell.com
On 2010-10-06 7.22 PM, Garret Christensen wrote:
I imagine this is fairly simple--I'd like to test the equality of the coefficients on a variable in two slightly different models. Imagine doing reg y x1 and then reg y x1 x2, and I'd like to test whether _b[x1] (from the first model)=_b[x1] (from the second model). I saw the FAQ page http://www.stata.com/support/faqs/stat/testing.html, but I don't think it works in this case.
thanks,
Garret Christensen
*
* 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/
*
* 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/