Hi,
I posted a while ago asking for instruction to estimate twoway 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 industryyear 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 Whiteperiod clustered errors (which will give you within crosssection 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
Twoway cluster robust standard error
Moderators: EViews Gareth, EViews Moderator
Twoway cluster robust standard error
 Attachments

 jb_zero.prg
 (842 Bytes) Downloaded 194 times

 excerp.wf1
 (301.15 KiB) Downloaded 169 times

 Gow et al 2009 Correct for Autocorrelation.pdf
 (334.41 KiB) Downloaded 469 times

 EViews Developer
 Posts: 2605
 Joined: Wed Oct 15, 2008 9:17 am
Re: Twoway cluster robust standard error
Not certain why, but your a3t is not being estimated as a panel equation.

 EViews Developer
 Posts: 2605
 Joined: Wed Oct 15, 2008 9:17 am
Re: Twoway cluster robust standard error
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: Twoway cluster robust standard error
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 firmyears, clustering by firmyear 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 "Twoway clusterrobust 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 doublecounting 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
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 firmyears, clustering by firmyear 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 "Twoway clusterrobust 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 doublecounting 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
 Attachments

 Thompson Cluster SE.pdf
 (271.36 KiB) Downloaded 400 times

 EViews Developer
 Posts: 2605
 Joined: Wed Oct 15, 2008 9:17 am
Re: Twoway cluster robust standard error
A quick glance at the paper suggests that you need to compute the last model using White heteroskedasticityrobust covariances.
Re: Twoway cluster robust standard error
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: Twoway cluster robust standard error
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 crosssection 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.
Just checking. I have tried to apply the method applied in the Thompson paper (see earlier posting by Chau).
I have run a fixed crosssection 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: Twoway cluster robust standard error
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
Best
Kouvas

 EViews Developer
 Posts: 2605
 Joined: Wed Oct 15, 2008 9:17 am
Re: Twoway cluster robust standard error
It's generally the result of not having enough observations to accurately identify the clustered errors. If you don't have enough observations for oneway, that doesn't go away when you do two way.
Who is online
Users browsing this forum: No registered users and 8 guests