Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: comparing regression coefficients across models


From   "Maarten Buis" <[email protected]>
To   <[email protected]>
Subject   st: RE: comparing regression coefficients across models
Date   Mon, 26 Jun 2006 17:38:29 +0200

This can be done with the -suest- command. See the (substantively nonsensical) example below:

*-------------begin example--------------------
sysuse auto, clear

reg price foreign
est store regprice

reg mpg weight
est store regmpg

suest regprice regmpg

test [regprice_mean]foreign=[regmpg_mean]weight
*-------------------------end example-----------------------

HTH,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology 
Vrije Universiteit Amsterdam 
Boelelaan 1081 
1081 HV Amsterdam 
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214 

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Narasimhan Sowmyanarayanan
Sent: maandag 26 juni 2006 17:29
To: [email protected]
Subject: st: comparing regression coefficients across models

Dear Statalist.

I have two models say y1 = a + bx1+cx2+e and y2 = a2 + (b1)x3+(c1)
x4+e. I want to compare if b1 = b after running the respective
regressions. I tried to store the estimates and use "test [equation1
name] _b[coefficientname] = [equation2 name] _b[coefficientname]".

I guess that stata stores only the last estimates. also when I use the
above command I get  a error

=exp required
r(100);

I am not sure what I am doing wrong. Would be grateful for pointers.

Thanks.
*
*   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/

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