Reply To: asreg: estimate regression by year and sector in Stata 4 years ago Thanks. The correct command would be bys B3_sector Year All the best.