Hi all,

I have a panel data set and I believe that correlations appear in two dimensions with both firm and time level. What is the correct way to use double-clustering in reghdfe?

These two give me different results:

Code:
reghdfe y1 x1 x2, absorb(year) cluster(companyid year)
and

Code:
reghdfe y1 x1 x2, absorb(year) cluster(companyid#year)
A paper I've been following states "clustering by firm and year to account for correlations among error terms within firm and within time in the analyses"

Which one should I use?

Many thanks.