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]
Re: st: comparing coefficients using suest (same sample, same DV)
From
Christopher Baum <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: comparing coefficients using suest (same sample, same DV)
Date
Tue, 14 Aug 2012 14:12:02 +0000
<>
On Aug 14, 2012, at 2:33 AM, Henry wrote:
> I estimate two regressions using the same sample:
>
> (1) Y=b1x1+e1
> (2) Y=b1x1+b2x2+e2
>
> and would like to test the difference in b1 across the two models. I
Before trying to test for this difference, look at the t-stat on x2. If its pval is small and the correlation between (x1,x2) is nontrivial, the b1 ocefficient in the first regression is inconsistent, so why would you care how much it differs from that of the second regression?
In any case there is no need to resort to -suest- to perform this test:
sysuse auto,clear
expand 2
g secsamp = _n>74
g x1 = mpg
g x2 = trunk
g x1ss = x1 * secsamp
g x2ss = x2 * secsamp
// coefficient on x1ss is the difference in x1 when x2 is included
reg price secsamp x1 x1ss x2ss, robust
sca diff = _b[x1ss]
reg price x1 if !secsamp, robust
sca x1only = _b[x1]
reg price x1 x2 if secsamp, robust
sca x2only = _b[x1]
sca diff2 = x2only - x1only
di "difference from single model " diff " from separate models " diff2
Kit
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* 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/