Suppose I want to cluster on country and year effects. Specifically, I am using reghdfe command but this question also applies to other context.
Clustering on the interaction term would be
Code:
egen cou_year = group(country year)
reghdfe y x1 x2 , absorb(cou_year)
or
Code:
reghdfe y x1 x2 , absorb(country#year) vce(cluster country#year)
And two way clustering is
Code:
reghdfe y x1 x2 , absorb(country#year) vce(cluster country year)
What are the difference between the two?

Also, I tried using 'felm' package in R. The results of these two ways are exactly the same.
However, when using 'reghdfe' in Stata, if I do in by clustering on the interaction terms, there would be a warning 'Warning: variance matrix is nonsymmetric or highly singular' and the standard errors cannot be estimated.

Thank you!