Statalist The Stata Listserver


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

Re: st: RE: comparing regression coefficients across models


From   "Narasimhan Sowmyanarayanan" <narasimhan.sowmyanarayanan@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: comparing regression coefficients across models
Date   Mon, 26 Jun 2006 11:48:44 -0400

Thanks a lot for this suggestion. It worked. I did try this earlier.
But here is the issue that I found with what I did earlier. Since I
had lag variables my suest did not work and gave me the following
error.

unable to generate scores for model ratiomodel
suest requires that predict allow the score option
r(322);

So just now I tried creating a lag_variable instead of l.variable
after your email for all the variables and this worked.

Thanks for your suggestion again.




On 6/26/06, Maarten Buis <M.Buis@fsw.vu.nl> wrote:
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: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of Narasimhan Sowmyanarayanan
Sent: maandag 26 juni 2006 17:29
To: statalist@hsphsun2.harvard.edu
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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index