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

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

From |
"Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk> |

To |
"Simon, Daniel" <simond@indiana.edu> |

Subject |
st: RE: question about xtivreg2 - produces different coefficient estimates than xtreg |

Date |
Wed, 6 Oct 2010 22:20:41 +0100 |

Daniel, I think it's because xtivreg2 and xtreg are dropping different variables because of collinearity. You haven't sent me the full output but I can see already that _Istate_~_90 is included by xtivreg2 but not by xtreg; probably xtivreg2 is dropping something different. This would also explain the identical R2s. Same regression, just a different set of variables is dropped to eliminate perfect collinearity. Try reestimating but dropping the identical variables by hand, so that you force the two programs to use identical regressors. You should get the same coefficient estimatates. --Mark (cc'd to Statalist - not sure why Daniel had problems posting to the list, he is using plain text format - one for Marcello, perhaps...) > -----Original Message----- > From: Simon, Daniel [mailto:simond@indiana.edu] > Sent: 06 October 2010 22:10 > To: Schaffer, Mark E > Subject: question about xtivreg2 - produces different > coefficient estimates than xtreg > > Hi Mark - I apologize for emailing you directly. I have tried > twice to send this to the statalist, but it has been bounced > twice. I cannot figure out why. I am having trouble with > xtivreg2. Specifically, I have estimated the same > fixed-effects model using both -xtreg- and -xtivreg2-. I > obtain different coefficient estimates for the two models. > However, the R-squared is the same in the two models. The > number of observations is also the same (except for the > singletons being dropped by -xtivreg2-). > > The model takes the following form: Y=bX + state-year fixed > effects + county fixed effects + e. > > X is a scalar (yrssince, in the results below). The > coefficients below are for X (yrssince) and the first few > state-year dummies. > > It appears that the issue has to do with correlation between > the X variable (yrssince) and the state-year dummies. When I > include the state-year variable as a single, continuous > variable (rather than a set of dummies), I obtain identical > results using the two models. This left me puzzled as to > this apparent collinearity would cause the two models to > yield different coefficient estimates. It also left me > unsure as to how to choose between the two models. > > > Thanks for any help that you can provide. > > Daniel > > > Here are the results (note the difference in observations is > due to -xtivreg2- dropping 14 singleton cases): > > > > Xtivreg2: > > > > FIXED EFFECTS ESTIMATION > > ------------------------ > > Number of groups = 202 Obs per > group: min = 2 > > > avg = 8.4 > > > max = 13 > > > > OLS estimation > > -------------- > > > > Statistics robust to heteroskedasticity and clustering on county_id > > > > Number of clusters (county_id) = 202 Number > of obs = 1704 > > F( 99, > 201) = 323.92 > > Prob > > F = 0.0000 > > Total (centered) SS = 24.71632023 > Centered R2 = 0.7405 > > Total (uncentered) SS = 24.71632023 > Uncentered R2 = 0.7405 > > Residual SS = 6.413274903 Root > MSE = .06534 > > > > -------------------------------------------------------------- > ---------------- > > | Robust > > icable_8_10 | Coef. Std. Err. z P>|z| > [95% Conf. Interval] > > -------------+------------------------------------------------ > ---------- > -------------+------ > > yrssince | .0111886 .0136323 0.82 0.412 > -.0155302 .0379073 > > _Istate_~_89 | -.108972 .1647771 -0.66 0.508 > -.4319291 .2139851 > > _Istate_~_90 | -.0936075 .1511352 -0.62 0.536 > -.389827 .202612 > > > > > > Xtreg: > > > > Fixed-effects (within) regression Number of obs > = 1718 > > Group variable: county_id Number of > groups = 216 > > > > R-sq: within = 0.7405 Obs per > group: min = 1 > > between = 0.2804 > avg = 8.0 > > overall = 0.3370 > max = 13 > > > > F(99,215) > = . > > corr(u_i, Xb) = -0.6486 Prob > F > = . > > > > (Std. Err. adjusted for 216 > clusters in county_id) > > -------------------------------------------------------------- > ---------------- > > | Robust > > icable_8_10 | Coef. Std. Err. t P>|t| > [95% Conf. Interval] > > -------------+------------------------------------------------ > ---------- > -------------+------ > > yrssince | .0335878 .0043672 7.69 0.000 > .0249799 .0421958 > > _Istate_~_89 | .0070347 .0056929 1.24 0.218 > -.0041863 .0182558 > > _Istate_~_90 | (omitted) > > _Istate_~_91 | -.014281 .0071043 -2.01 0.046 > -.028284 -.000278 > > -- Heriot-Watt University is a Scottish charity registered under charity number SC000278. * * 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/

**Follow-Ups**:**st: RE: question about xtivreg2 - produces different coefficient estimates than xtreg***From:*"Simon, Daniel" <simond@indiana.edu>

- Prev by Date:
**Re: st: ST graphs with CI's** - Next by Date:
**Re: st: latent factor model with stochastic gradient method/alternating least squares** - Previous by thread:
**st: Fama-MacBeth standard errors with Newey-West corrections** - Next by thread:
**st: RE: question about xtivreg2 - produces different coefficient estimates than xtreg** - Index(es):