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, is already up and running.

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

st: Testing coefficients across different models

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

I'd like to test whether coefficients change across models. The Stata FAQ 
addresses this in for simple models 
(, 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 
test _b[disturbed]=0, notest
test _b[x1]=0, accum

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

Garret Christensen

*   For searches and help try:

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