Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Regression with cluster error hangs program


From   Alfonso Sanchez-Penalver <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Regression with cluster error hangs program
Date   Tue, 11 Feb 2014 07:47:23 -0500

Hi Seb,

A couple of comments. First if you want both the main effects and the interaction effect you can write -i.firm##c.yrdiff- instead of having to write things twice.

My second question is why do you expect further correlation of the errors by firm, which is what clustering the variance corrects for. By further correlation I mean that you are already accounting for differences in the unobserved means by firm by introducing he firms' dummies, so how would the errors be correlated within the firms now that they don't have differences in values?

Lastly I would suggest using no constant in your regression since you have both firm fixed effects and firm specific trends.

I hope this helps,

Alfonso Sanchez-Penalver

> On Feb 11, 2014, at 4:03 AM, Gui Deng Say <[email protected]> wrote:
> 
> Hi,
>    I am using Stata13MP and I have two questions regarding OLS
> regressions. I have an unbalanced firm-year panel consisting of 35k
> observations, about 4900 firms.
> 
> I am trying trying to estimate the following model.
> 
> regress DV IV i.firm yrdiff i.firm#c.yrdiff
> 
> where yrdiff is a time counter variable, measured relative to a
> particular year. The reason i'm using i.firm#c.yrdiff is to control
> for firm specific time trend
> 
> q1. Firstly, estimating this model takes very long ~ 2 hours. Is this
> normal? If not, what might be the reason(s)?
> 
> q2. Secondly I tried to cluster the standard errors by firm. i.e. i
> tried this model
> regress DV IV i.firm yrdiff i.firm#c.yrdiff, vce(cluster firm)
> 
> This regression kept running...and in the end, the Stata program
> freezes. Any ideas?
> 
> Many thanks,
> Seb
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index