Page 1 of 1

Two-way cluster robust standard error

Posted: Sat Jul 17, 2010 9:10 am
by cmd41
Hi,

I posted a while ago asking for instruction to estimate two-way cluster robust standard errors (i.e. clustered by BOTH cross section and period, as described in page 12 of the attached paper). Glenn kindly provided me with the answer, which I very much appreciate. I quote Glenn's answer below:

"...
In my quick reading of the paper, what you first need to do is to compute the clustering in each direction and save the covariances. That will give you V1 and V2.

Getting VI is harder since EViews doesn't offer clustering along an arbitrary dimension (we should do this at some point).

What you'll have to do is to create a new variable that indexes industry-year combinations. Then restructure your workfile page to an undated panel structured by that variable. Estimate the *same* model you estimated when you obtained V1 and V2, with White-period clustered errors (which will give you within cross-section correlation robust errors). Save the covariances as VI.

Then V1 + V2 - VI should give you the desired variance estimates.
..."

I followed the instructed procedures to estimate quite a few equations, and things seemed to run smoothly untill I had the following error message: "Log or square root of negative number in "Vector..." in one instance.

I understand that I have a negative value in the diagonal of the covariance matrix, but could not figure out why. Any help is very much appreciated!

I basically try to regress wc_ab_prod on a constant and 4 independent variables: wl_mvye_la1_dev, wc_bm_la1_dev, wc_roa_dev and jb_ov (which is dummy with value of 1 and 0). Attached is the excerp of the data and my program.

I hope I can have some feedbacks. Thanks in advance!

Chau

Re: Two-way cluster robust standard error

Posted: Mon Jul 19, 2010 9:42 am
by EViews Glenn
Not certain why, but your a3t is not being estimated as a panel equation.

Re: Two-way cluster robust standard error

Posted: Mon Jul 19, 2010 9:53 am
by EViews Glenn
Looked at the workfile again, and I know why it's not estimating as a panel. Your joint clusters uniquely identify a single observation so that clustering is not possible within that grouping.

Re: Two-way cluster robust standard error

Posted: Tue Jul 20, 2010 1:14 am
by cmd41
Hi Glenn,

First of all, thank you very much for the response.

You're absolutely right that the a3t is not estimated as a panel. However, because in this case the observations are firm-years, clustering by firm-year should produce White stadard errors (as explained in page 12 of the Gow et al's paper attached in the first post, in the last sentence of the paragraph immediately before the "Two-way cluster-robust standard errors" section). Therefore, I would expect the vi_t should not have negative values in the diagonal because in Vi_t = V1 + V2 - V3, subtracting V3 (which is the covariance matrix of my a3t equation) means only to correct for double-counting the within firm variance (please see page 7 of the Thompson's paper attached to this reply).

Therefore, after all, I am still stucked why I have negative values in the diagonal of the vi_t. I would really appreciate any further clarification.

Thanks again.

Chau

Re: Two-way cluster robust standard error

Posted: Tue Jul 20, 2010 8:38 am
by EViews Glenn
A quick glance at the paper suggests that you need to compute the last model using White heteroskedasticity-robust covariances.

Re: Two-way cluster robust standard error

Posted: Fri Jul 23, 2010 10:32 am
by cmd41
Thank you very much Glenn. I can confirm that I've tried the White covariance without restructuring the workfile (i.e. when the workfile is still as a dated panel), and the problem seemed to be resolved.

Re: Two-way cluster robust standard error

Posted: Wed Jul 20, 2011 3:23 am
by btims
Dear Glenn,

Just checking. I have tried to apply the method applied in the Thompson paper (see earlier posting by Chau).
I have run a fixed cross-section effects OLS panel, for which I use the cov. estimation options "cxwhite" as the V1 covariance matrix; "perwhite" as V2; and "stackedwhite" as the Vl matrix.
Could you please confirm this is the correct way?
Best wishes,

Ben.

Re: Two-way cluster robust standard error

Posted: Mon Apr 18, 2016 6:06 am
by Kouvas
Just a quick question regarding the two way cluster errors. In case that the estimation using cxwhite provides a warning message about estimated coefficient covariance matrix being of reduced rank should this pose a problem in the estimation of the two way cluster errors?. Thanks in advance.

Best

Kouvas

Re: Two-way cluster robust standard error

Posted: Mon Apr 18, 2016 11:54 am
by EViews Glenn
It's generally the result of not having enough observations to accurately identify the clustered errors. If you don't have enough observations for one-way, that doesn't go away when you do two way.