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: Testing coefficients across different models


From   Garret Christensen <[email protected]>
To   Stata List <[email protected]>
Subject   st: Testing coefficients across different models
Date   Fri, 10 Sep 2010 22:13:06 -0700 (PDT)

Statalisters,
I'd like to test whether coefficients change across models. The Stata FAQ 
addresses this in for simple models 
(http://www.stata.com/support/faqs/stat/testing.html), but I'm confused about 
slightly more complicated circumstances. 



My original command/model is reg y x1 x2 z x3 x4
Then I change some observations in z, and I'd like to test if the coefficients 
on x1 and x2 are the same as before. I don't care about the coefficients on x3 
or x4 (they're fixed effects).
Based on the help at the FAQ above, here's what I'm doing:

use originaldata
gen disturbed=0
reg y x1 x2 z x3 x4
save originaldata, replace
replace z=z+[some disturbance]
reg y x1 x2 z x3 x4 
gen disturbed=1
append using originaldata
gen dx1=disturbed*x1
gen dx2=disturbed*x2
reg y x1 x2 z x3 x4 disturbed dx1 dx2

Is  that the right set-up? I expected the coefficients on disturbed, dx1  and 
dx2 to be close to zero, but they aren't. Do I have to include  interactions for 
x3 and x4? (That might be a hassle since I've got a lot  of fixed effects.)

When I get this set up correctly, to test separately whether x1 or x2 are 
different:
test _b[disturbed]=0, notest
test _b[x1]=0, accum

and then 
test _b[disturbed]=0, notest
test _b[x2]=0, accum

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index