Hello everyone, I am currently facing an issue regarding the efficiency of a loop operation in Stata 17 for Windows.
My goal is to append multiple .dta files using a loop. However, I have noticed that the process is considerably slow. There are 300 "nfile" and each "nfile" takes 1 minute. So it takes too much time. Below, I've included the relevant codes:
Thank you
My goal is to append multiple .dta files using a loop. However, I have noticed that the process is considerably slow. There are 300 "nfile" and each "nfile" takes 1 minute. So it takes too much time. Below, I've included the relevant codes:
Code:
forvalues v=2/`nfile' { use "${tmp_path}/ind.dta", clear append using "${tmp_path}/ctytemp.dta" quietly save "${tmp_path}/ctytemp.dta", replace }
Comment