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

st: RE: ivreg versus xtivreg

From   "Schaffer, Mark E" <>
To   <>
Subject   st: RE: ivreg versus xtivreg
Date   Thu, 11 Feb 2010 18:43:41 -0000


> -----Original Message-----
> From: 
> [] On Behalf Of 
> sara borelli
> Sent: Thursday, February 11, 2010 6:32 PM
> To:
> Subject: st: ivreg versus xtivreg
> Dear members, 
> I am running the following regressions in STATA8.2:
> CRit =  a*Xit +  b*Zit  + (state by year fixed effects)  + 
> (county fixed effects), cluster(county)
> CRit= crime rate in county i year t
> Xit = endogenous regressor
> Zit = set of 7 exogenous regressors
> state by year fixed effects = interactions between indicators 
> for each state and year
> I instrument Xit using Wit
> There are 246 counties, 10 states, 8 years
> I have been running this model with two commands
> xi:   ivreg  CRit  (Xit=Wit)  Zit   (state by year fixed 
> effects)  i.county, cluster(county)
> xtivreg2  CRit  (Xit=Wit)  Zit   (state by year fixed 
> effects)  i.county, fe i.(county) cluster(county)
> the two commands give exactly the same coefficient, and just 
> slightly different std errors, but after xtivreg2 I get the 
> following message:
> Error: estimated covariance matrix of moment conditions not 
> of full rank;
> overidentification statistic not reported, and standard 
> errors and       model tests should be interpreted with 
> caution. Possible causes:  singleton dummy variable (dummy 
> with one 1 and N-1 0s or vice versa) fwl option may address problem.
> I noticed that 2 states have a number of counties (clusters)  
> lower than the number of years available. By dropping these 
> two states STATA run the xtivreg2 without giving the error message.
> I have read the help file and FAQ and I think something is 
> going with those state by year effects that creates a kind of 
> singleton dummy problem, but I am not sure 
> Any help would be appreciated

It's not a problem.

You will note that xtivreg2 does not report the fixed effect dummy

xi: ivreg2 explicitly includes the dummies, and the coefficients are

The warning message reported by ivreg2 is triggered by the fact that
there are now many more rows/columns in the VCV, the new, extended VCV
is no longer full rank.

In fact, the coefficients and standard errors for the dummies aren't
consistent anyway (under the usual panel data assumptions - this is the
"incidental parameters problem").  So you really aren't interested in
the extended VCV anyway.

> thank you
> sara
> *
> *   For searches and help try:
> *
> *
> *

Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

*   For searches and help try:

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