Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Adding wald test using esttab.


From   "Gupta, Sumedha" <sugupta@iupui.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Adding wald test using esttab.
Date   Wed, 11 May 2011 20:54:05 +0000

Hi,

I am looking for some guidance on how to add the wald test for difference between coefficients from two models to a table generated using esttab. I do the following:

 sysuse auto
(1978 Automobile Data)

. eststo R1: quietly regress price weight mpg

. eststo R2: quietly regress price weight mpg foreign

. esttab

--------------------------------------------
                      (1)             (2)   
                    price           price   
--------------------------------------------
weight              1.747**         3.465***
                   (2.72)          (5.49)   

mpg                -49.51           21.85   
                  (-0.57)          (0.29)   

foreign                            3673.1***
                                   (5.37)   

_cons              1946.1         -5853.7   
                   (0.54)         (-1.73)   
--------------------------------------------
N                      74              74   
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001

Now I want to test if the weight coefficient in model 1 is statistically different from that in Model 2. In my own program the following works:

suest R1 R2
test [R1]weight=[R2]weight

But here I get the following error:
equation [R1] not found

So my first question is how to conduct the above test. Second is how to add the p value from the above Wald test to the table generated using esttab? 

Any help will be much appreciated. Many thanks!
- Sumedha.







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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index