Hello all,

I am running a FE regression using the LSDV approach (industry and year FE) and i want to cluster standard errors by firm and year.
Can i group them? My code is the following:

Is this the correct way to do it?
Appreciate your help

Code:
 xtset id year


. egen double_cluster = group (company_key year)

. regress firm_beta_w esg_single_lag1 i.industry_key i.year, vce (cluster double_cluster)