Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: xtreg vs reg w/ dummies


From   David Harless <dwharles@vcu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xtreg vs reg w/ dummies
Date   Mon, 13 Mar 2006 11:14:40 -0500

Scott Hankins wrote:
********************************************************************************
I have estimated what I belive to be the same model from an econometric point of
view but Stata doesn't give me the same results.

The 1st uses "xtreg" to estimate a fixed effects model (along with "xi" for the
year effects). The 2nd uses "regress" and "xi" to generate dummy variables for
the individual fixed effects as well as year effects.

The only difference between the two routines is the coefficient on pitt is
"dropped" when I use xtreg. I thought this was a multi-colinearity problem until
I ran the regression with "regress" and dummies. It may still be a
multi-colinearity problem as I do not believe the estimated coefficient is correct.

Why does one command estimate this coefficient when the other won't? I assume
there is something subtle (or not so subtle) going on behind the scenes with Stata.

thanks

scott

************** 1st model *****************
xi: xtreg csec i.year pitt breech previous medicaid if att_issue>=1994 ,fe
i(new_attid)
i.year _Iyear_1994-2004 (naturally coded; _Iyear_1994 omitted)

Fixed-effects (within) regression Number of obs = 1002
Group variable (i): new_attid Number of groups = 353

R-sq: within = 0.3679 Obs per group: min = 1
between = 0.0303 avg = 2.8
overall = 0.1626 max = 10

F(14,635) = 26.40
corr(u_i, Xb) = -0.0949 Prob > F = 0.0000

------------------------------------------------------------------------------
csec | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Iyear_1995 | -.0457742 .0561129 -0.82 0.415 -.1559636 .0644151
_Iyear_1996 | -.0237076 .0557849 -0.42 0.671 -.1332528 .0858377
_Iyear_1997 | -.0281403 .0561732 -0.50 0.617 -.138448 .0821675
_Iyear_1998 | -.0322946 .0566514 -0.57 0.569 -.1435413 .0789521
_Iyear_1999 | -.0382227 .0567723 -0.67 0.501 -.1497069 .0732615
_Iyear_2000 | -.0388285 .0567053 -0.68 0.494 -.1501811 .0725242
_Iyear_2001 | -.0312434 .0567966 -0.55 0.582 -.1427752 .0802885
_Iyear_2002 | .027376 .0568078 0.48 0.630 -.0841779 .1389299
_Iyear_2003 | -.0026329 .0570527 -0.05 0.963 -.1146676 .1094018
_Iyear_2004 | .0051664 .0572499 0.09 0.928 -.1072556 .1175883
pitt | (dropped)
breech | .7840754 .0496142 15.80 0.000 .6866476 .8815032
previous_c~c | .3019584 .0425659 7.09 0.000 .2183714 .3855454
medicaid | -.03466 .0199792 -1.73 0.083 -.0738933 .0045733
_cons | .1505913 .0561206 2.68 0.007 .040387 .2607956
-------------+----------------------------------------------------------------
sigma_u | .23549195
sigma_e | .09962159
rho | .84820555 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(352, 635) = 7.22 Prob > F = 0.0000
...

******************************************************************************

This case is curious because pitt is dropped in the -xtreg- regression, but the F-statistic numerator degrees of freedom read as if it is not dropped:
F(14,635) = 26.40

With the dropped variable the numerator degrees of freedom should be 13, not 14. Why would 14 be listed in this circumstance?

Dave Harless
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index