[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: xtivreg2, error 198
> -----Original Message-----
> From: firstname.lastname@example.org
> [mailto:email@example.com] On Behalf Of
> Simon Lüchinger
> Sent: 24 May 2006 15:42
> To: firstname.lastname@example.org
> Subject: st: xtivreg2, error 198
> Dear all,
> I have an unbalanced panel data set at the individual level
> and would like to run fixed-effect models with the dependent
> variable at the individual level and an aggregate variable
> (per region and year) as an explanatory variable. Further, I
> would like to instrument the aggregate variable and adjust
> the standard errors for possible clustering within region per
> year (region*year). Without instrumenting the aggregate
> variable, everything works fine with areg and the cluster option.
> However, using xtivreg2 with the cluster option for the 2SLS
> regressions, I get the following error message: "cluster
> option not supported if a panel spans more than one cluster
> r(198)". Any suggestions whats wrong and how I can get around
> this problem?
The problem is interesting but tricky. The usual classical and robust var-cov matrix for the fixed effects estimator need a degrees of freedom adjustment for the fixed effects (see any textbook treatment).
The cluster-robust var-cov matrix doesn't need this adjustment, so long as the panels (corresp. to the fixed effects) don't span more than one cluster.
The problem arises when the panels cut across clusters. Some dof adjustment is needed, but what should it be? I don't know, and I haven't seen any paper that describes exactly what it should be. When writing -xtivreg2-, I opted simply for the program to exit with error. Official -xtivreg- now has the -nonest- and -dfadj- options; these didn't exist when I wrote -xtivreg2-. You'll see that they allow you to go between the extremes of no dof adjustment (which will give you SEs that are too small) and a full dof adjustment (which will give you "conservative" SEs that are on the large side). Have a look at them and see if they would suit your needs. I could perhaps put them into -xtivreg2-....
Prof. Mark Schaffer
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3296
> Many thanks in advance
> * 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/
* For searches and help try: