Clustered Standard Errors

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Clustered Standard Errors

Postby mikeguima » Fri Apr 06, 2018 3:41 am

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!

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Tue Apr 10, 2018 12:51 pm

Anyone please? :?

startz
Non-normality and collinearity are NOT problems!
Posts: 3337
Joined: Wed Sep 17, 2008 2:25 pm

Re: Clustered Standard Errors

Postby startz » Tue Apr 10, 2018 2:26 pm

Have you looked in the Help system under "cluster?"

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Tue Apr 10, 2018 3:27 pm

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!

startz
Non-normality and collinearity are NOT problems!
Posts: 3337
Joined: Wed Sep 17, 2008 2:25 pm

Re: Clustered Standard Errors

Postby startz » Tue Apr 10, 2018 3:55 pm


mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Thu Apr 12, 2018 10:27 am

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.
Attachments
Panel 1.PNG
Panel 1.PNG (12.69 KiB) Viewed 521 times
Panel 2.PNG
Panel 2.PNG (22.67 KiB) Viewed 521 times

startz
Non-normality and collinearity are NOT problems!
Posts: 3337
Joined: Wed Sep 17, 2008 2:25 pm

Re: Clustered Standard Errors

Postby startz » Thu Apr 12, 2018 10:53 am

This one is going to need the EViews team.

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Thu Apr 12, 2018 11:12 am

I'll wait! :)

Thank you Startz!

EViews Glenn
EViews Developer
Posts: 2590
Joined: Wed Oct 15, 2008 9:17 am

Re: Clustered Standard Errors

Postby EViews Glenn » Thu Apr 12, 2018 11:16 am

The panel estimators have built-in tools which allow for clustering by cross-section or by period, but not by both. So you can cluster by firm, and you can cluster by year, but not by firm-year.

The non-panel 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 firm-year combination? If you can tell me a bit more about your data, I can offer some suggestions on how to proceed.

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Fri Apr 13, 2018 10:32 am

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 firm-year.

Thank you, Glenn!

EViews Glenn
EViews Developer
Posts: 2590
Joined: Wed Oct 15, 2008 9:17 am

Re: Clustered Standard Errors

Postby EViews Glenn » Tue Apr 17, 2018 5:19 pm

So there are multiple periods per firm-year? Have you already structured your workfile as a panel? Did EViews create a new sub-index?

For purposes of estimation, what panel features are you using? Lags, individual or period effects?

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Thu Apr 19, 2018 4:19 am

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.
Attachments
Eviews.PNG
Eviews.PNG (53.22 KiB) Viewed 370 times

EViews Glenn
EViews Developer
Posts: 2590
Joined: Wed Oct 15, 2008 9:17 am

Re: Clustered Standard Errors

Postby EViews Glenn » Tue Apr 24, 2018 5:20 pm

It looks as though you have a single observation per period/cross-section.

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 two-way clustered standard errors.

If you have relatively few cross-sections 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 built-in, only the one. If all that you want is a one-way standard error, those are available from the Coef Covariance Method combo. If you want two-way, 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

mikeguima
Posts: 19
Joined: Wed Mar 14, 2018 8:07 am

Re: Clustered Standard Errors

Postby mikeguima » Wed Apr 25, 2018 11:00 am

I'm not sure what you mean by only one observation per firm-year (is it possible to have more than one?), but yes, each firm-year 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!

EViews Glenn
EViews Developer
Posts: 2590
Joined: Wed Oct 15, 2008 9:17 am

Re: Clustered Standard Errors

Postby EViews Glenn » Fri Apr 27, 2018 9:29 am

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 one-way covariance estimators, the naming convention is the opposite of what you wrote. The period estimators denote clustering by individual, and the cross-section are clustering by time. The naming convention is from the old system estimation days in that it emphasizes allowing "between period correlation" and "between cross-section 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 cross-sections so @expand isn't a practical option if you have cross-section effects.

So once you are clear about what regression specifications you wish to estimate, we can come up with the right approach.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 8 guests