I'm getting stuck with something probably silly.
I have a number of variables that share a common prefix which I would like to regress individually using reghdfe.
What I have come up with is not working. I'm getting an 'unexpected end of file'.
Code:
foreach var of spei_* { quietly reghdfe ln_agprod var, absorb(country_id continent_id#year) vce(cluster country_id) estimates store est_`var' }
Many thanks for your help!
0 Response to Looping using list of var with similar prefix
Post a Comment