Dear STATA helpers,

I am trying to save regression coefficients by each date and group for the entire sample period (2006 to 2019).
What I am trying to use is "statsby", but I've only used with each date before and never used it for each date and group together.

So, what I really need to have is:
1) saving regression coefficients for each date and group for 14years of daily data.
2) to do 1) without clearing the original dataset that I ran the regressions on.

I currently have :
------------------------------------------------------------------
statsby _b _se e(r2_a) e(N) , by(group) clear: reg AC K K2
foreach var in K K2 { gen t_`var' = _b_`var'/_se_`var'
}

------------------------------------------------------------------
then the results are as you expected, only creating variables by group (not both by each group and date) and also clears my original dataset.
Can you please make comment below with some ideas and answers for me?
Thank you and I look forward to seeing your comments soon.