Stata: cluster2 does not compute standard errors for some industry-year dummies

526 views
Skip to first unread message

joost impink

unread,
Jan 25, 2015, 12:10:44 PM1/25/15
to wrd...@googlegroups.com
hi,

I am attempting to cluster by firm and year, while including year dummies.

this works fine: reg dep indep1 indep2 etc fyear1-fyear12 ind1-ind10 

this works as expected (same coefficients, lower t-stats): reg dep indep1 indep2 etc fyear1-fyear12 ind1-ind10, cluster (gvkey) 

I have trouble with: cluster2  dep indep1 indep2 etc fyear1-fyear12 ind1-ind10,fcluster (gvkey) tcluster(fyear)

With cluster2, the coefficients remain the same (as expected), but for half the year-dummies (fyear vars), the standard error is not computed (shown as missing), so there is no t-value/p-value (but there are coefficients). There are no problems for other variables (both coefficients as well as standard errors).

Has anybody experienced this before? (Is it 'normal'?)

thanks,

Joost


roger.mcn...@gmail.com

unread,
Feb 4, 2015, 5:22:39 PM2/4/15
to wrd...@googlegroups.com
Joost, this happens on my end all the time.  My understanding is that you are running out of degrees of freedom, as you have fewer pseudo-observations (year clusters) than regressors (you aren't close to being asymptotic, covariance matrices get funky, etc.).  Stata is just telling you that reliable standard errors cannot be computed for these variables.  This isn't a big deal unless you are trying to make inferences based on the dummies in question.

The below paper gives an idea as to what's happening (in the general sense), and the below link (Statalist) discusses it specifically in regards to cluster2.

A. Colin Cameron and Douglas L. Miller, "A Practitioner's Guide to Cluster-Robust Inference", Journal of Human Resources, forthcoming, Spring 2015

http://www.statalist.org/forums/forum/general-stata-discussion/general/7293-cluster2

joost impink

unread,
Feb 4, 2015, 6:08:19 PM2/4/15
to wrd...@googlegroups.com
hi Roger,

Thanks, that makes sense! I'm glad I'm not the only one :)

best regards,

Joost
Reply all
Reply to author
Forward
0 new messages