Hello everyone,

I am trying to store estimates of a (reghdfe) regression in a loop. The regressions of the loop are all running fine, but only the last estimate is stored. What am I doing wrong?


Code:
sysuse auto, clear

foreach y of varlist price mpg turn {
    reghdfe `y' length trunk, absorb(gear_ratio) vce(cluster displacement) 
eststo m`i'
}
est dir
Thank you for your help,

Nicolas Charette