Bookmark and Share

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]

st: Adding wald test using esttab.


From   "Gupta, Sumedha" <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index