Clustered Standard Errors
Moderators: EViews Gareth, EViews Moderator
Clustered Standard Errors
Hello everyone!
I'm using Eviews 10 for my dissertation in Finance and would like to ask you how I can estimate clustered standard errors (in my case, clustered by firm and year, since firms are my individuals and I'm using panel data) in Eviews 10, since I can't find how to in the options.
Thank you in advance for you help!
I'm using Eviews 10 for my dissertation in Finance and would like to ask you how I can estimate clustered standard errors (in my case, clustered by firm and year, since firms are my individuals and I'm using panel data) in Eviews 10, since I can't find how to in the options.
Thank you in advance for you help!
Re: Clustered Standard Errors
Anyone please?

 Nonnormality and collinearity are NOT problems!
 Posts: 3408
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Clustered Standard Errors
Have you looked in the Help system under "cluster?"
Re: Clustered Standard Errors
I couldn't find anything on the clustering I want to do with panel data. If it is there, could you please point it out to me? Thank you!
Re: Clustered Standard Errors
Thank you for the reply.
That is indeed what I want, but when I attempted the estimation I noticed there are no options for it in panel data (dated panel, more specifically; if i use unstructured data, the options are there).
Is there any reason why the options aren't available for panel data when even the example the manual uses is based on it? Is there any difference/problem in using unstructured/undated data in my analysis so I can perform said clustering?
Thank you again!
P.S.: Attached go the estimation options I get for dated panel.
That is indeed what I want, but when I attempted the estimation I noticed there are no options for it in panel data (dated panel, more specifically; if i use unstructured data, the options are there).
Is there any reason why the options aren't available for panel data when even the example the manual uses is based on it? Is there any difference/problem in using unstructured/undated data in my analysis so I can perform said clustering?
Thank you again!
P.S.: Attached go the estimation options I get for dated panel.
 Attachments

 Panel 1.PNG (12.69 KiB) Viewed 933 times

 Panel 2.PNG (22.67 KiB) Viewed 933 times

 Nonnormality and collinearity are NOT problems!
 Posts: 3408
 Joined: Wed Sep 17, 2008 2:25 pm
Re: Clustered Standard Errors
This one is going to need the EViews team.
Re: Clustered Standard Errors
I'll wait!
Thank you Startz!
Thank you Startz!

 EViews Developer
 Posts: 2600
 Joined: Wed Oct 15, 2008 9:17 am
Re: Clustered Standard Errors
The panel estimators have builtin tools which allow for clustering by crosssection or by period, but not by both. So you can cluster by firm, and you can cluster by year, but not by firmyear.
The nonpanel estimators were recently updated to allow for arbitrary clustering.
I am pretty sure that there is a way to compute what you want, but I'm not entirely clear at to the structure of your data. Are there multiple observations for each firmyear combination? If you can tell me a bit more about your data, I can offer some suggestions on how to proceed.
The nonpanel estimators were recently updated to allow for arbitrary clustering.
I am pretty sure that there is a way to compute what you want, but I'm not entirely clear at to the structure of your data. Are there multiple observations for each firmyear combination? If you can tell me a bit more about your data, I can offer some suggestions on how to proceed.
Re: Clustered Standard Errors
The in built tools you mention for clustering by cross section or period are those under the "coef covariance method"? If not, where? And which would be more appropriate to achieve said clustering, since there are many options?
Regarding the data, it's panel with over 2000 firms and 12 years, with multiple variables for each firmyear.
Thank you, Glenn!
Regarding the data, it's panel with over 2000 firms and 12 years, with multiple variables for each firmyear.
Thank you, Glenn!

 EViews Developer
 Posts: 2600
 Joined: Wed Oct 15, 2008 9:17 am
Re: Clustered Standard Errors
So there are multiple periods per firmyear? Have you already structured your workfile as a panel? Did EViews create a new subindex?
For purposes of estimation, what panel features are you using? Lags, individual or period effects?
For purposes of estimation, what panel features are you using? Lags, individual or period effects?
Re: Clustered Standard Errors
The file is structured as panel. I don't quite undertand the first part of the question, so I send a snapshot of my data attached.
Regarding estimation, I intend on maybe using individual and time fixed effects.
Regarding estimation, I intend on maybe using individual and time fixed effects.
 Attachments

 Eviews.PNG (53.22 KiB) Viewed 782 times

 EViews Developer
 Posts: 2600
 Joined: Wed Oct 15, 2008 9:17 am
Re: Clustered Standard Errors
It looks as though you have a single observation per period/crosssection.
It also sounds as though you want to use the fixed effects tools. If you didn't need those, I would say that unstructuring the workfile and just estimating using the standard equation clustered standard errors would be the easiest approach. That would allow you to do both one and twoway clustered standard errors.
If you have relatively few crosssections and periods, I might still recommend this approach, with you using the @expand to create the desired dummy variables.
Alternately, the panel estimators don't have the two way clustered builtin, only the one. If all that you want is a oneway standard error, those are available from the Coef Covariance Method combo. If you want twoway, unfortunately, you'll have to work for those a bit.
There are some posts in the form that outline this computation. I found one with a quick search. I'll see if I can dig up the more detailed one.
viewtopic.php?f=4&t=2686&p=15983&hilit=Cluster+robust#p15983
It also sounds as though you want to use the fixed effects tools. If you didn't need those, I would say that unstructuring the workfile and just estimating using the standard equation clustered standard errors would be the easiest approach. That would allow you to do both one and twoway clustered standard errors.
If you have relatively few crosssections and periods, I might still recommend this approach, with you using the @expand to create the desired dummy variables.
Alternately, the panel estimators don't have the two way clustered builtin, only the one. If all that you want is a oneway standard error, those are available from the Coef Covariance Method combo. If you want twoway, unfortunately, you'll have to work for those a bit.
There are some posts in the form that outline this computation. I found one with a quick search. I'll see if I can dig up the more detailed one.
viewtopic.php?f=4&t=2686&p=15983&hilit=Cluster+robust#p15983
Re: Clustered Standard Errors
I'm not sure what you mean by only one observation per firmyear (is it possible to have more than one?), but yes, each firmyear has one observation (although multiple variables).
So you're suggesting I unstructure the dated panel? I had noticed that the results look pretty much the same in both ways (unstructured vs dated panel), but is it 100% ok to do that or is there any disadvantage in having the data unstructured vs panel that I should be wary of? I have 13 years and 2600 cross sections, by the way.
From the one way estimators in the coef covariance option, is it correct that the period options are equivalent to clustering by time and cross section options equivalent to clustering by individual (firms, in my case), while accounting for heteroscedasticity and/or autocorelation at the same time? The many options leave me a bit confused even after reading the manual, so your clarifications would be very much appreciated!
Thank you very much for your help and patience!
So you're suggesting I unstructure the dated panel? I had noticed that the results look pretty much the same in both ways (unstructured vs dated panel), but is it 100% ok to do that or is there any disadvantage in having the data unstructured vs panel that I should be wary of? I have 13 years and 2600 cross sections, by the way.
From the one way estimators in the coef covariance option, is it correct that the period options are equivalent to clustering by time and cross section options equivalent to clustering by individual (firms, in my case), while accounting for heteroscedasticity and/or autocorelation at the same time? The many options leave me a bit confused even after reading the manual, so your clarifications would be very much appreciated!
Thank you very much for your help and patience!

 EViews Developer
 Posts: 2600
 Joined: Wed Oct 15, 2008 9:17 am
Re: Clustered Standard Errors
In a general clustering framework it is possible for there to be multiple observations in the crossed dimension. In the panel framework we disallow this, but I wanted to make certain that I understood your data.
On the oneway covariance estimators, the naming convention is the opposite of what you wrote. The period estimators denote clustering by individual, and the crosssection are clustering by time. The naming convention is from the old system estimation days in that it emphasizes allowing "between period correlation" and "between crosssection correlation" in the name.
If you don't have individual or period effects, the only issue with unstructuring will be if you have lags. In that case, you'll need to generate the lag series prior to unstructuring, otherwise the lags will incorrectly cross seams between individuals.
If you have individual or period fixed effects that you wish to include, then the practical issue is how to estimate the model in the instructured workfile. We can explore the best way to proceed as you have a lot of crosssections so @expand isn't a practical option if you have crosssection effects.
So once you are clear about what regression specifications you wish to estimate, we can come up with the right approach.
On the oneway covariance estimators, the naming convention is the opposite of what you wrote. The period estimators denote clustering by individual, and the crosssection are clustering by time. The naming convention is from the old system estimation days in that it emphasizes allowing "between period correlation" and "between crosssection correlation" in the name.
If you don't have individual or period effects, the only issue with unstructuring will be if you have lags. In that case, you'll need to generate the lag series prior to unstructuring, otherwise the lags will incorrectly cross seams between individuals.
If you have individual or period fixed effects that you wish to include, then the practical issue is how to estimate the model in the instructured workfile. We can explore the best way to proceed as you have a lot of crosssections so @expand isn't a practical option if you have crosssection effects.
So once you are clear about what regression specifications you wish to estimate, we can come up with the right approach.
Who is online
Users browsing this forum: No registered users and 4 guests