Code:
local ipv "angry fear intimacy_idx cont12_idx ev12_idx pv12_idx sv12_idx ipv_ovall_idx" local ipv_12_entire "cont12_idx ev12_idx pv12_idx sv12_idx cont_idx ev_idx pv_idx sv_idx" *------------------------------------------------------------------------------* * REGRESSION TABLES: PANEL A *------------------------------------------------------------------------------* * IPV outcomes eststo clear foreach outcome of local ipv { eststo `outcome'_demo: reg `outcome' arm_free `demo_controls', vce(cluster new_csps) estadd local demo_ctrl "Yes" : `outcome'_demo estadd local fe "None" : `outcome'* } estout * using "${Oleaf}/REG_IPV/panelA_ipv.tex", replace * Violence indexes (12 months VS entire marriage) eststo clear foreach outcome of local ipv_12_entire { eststo `outcome'_demo: reg `outcome' arm_free `demo_controls', vce(cluster new_csps) estadd local demo_ctrl "Yes" : `outcome'_demo estadd local fe "None" : `outcome'* } estout * using "${Oleaf}/REG_IPV/panelA_ipv_12_entire.tex", replace
Code:
loc i = 1 eststo clear foreach outcome of local `ipv' `ipv_12_entire' { eststo `outcome': reg `outcome' arm_free `demo_controls', vce(cluster new_csps) estadd local demo_ctrl "Yes" : `outcome' estadd local fe "None" : `outcome' estout * using "${Oleaf}/REG_IPV/panelA_`outcome'.tex", replace loc i = `i' + 1 }
0 Response to How to loop through two locals instead of all variables inside each local
Post a Comment