Hi,
Hope you can kindly help me with this issue.
I am trying to parallelize a process which needs to be done over many stats (mean, median, etc), years, geographical areas and countries using microdata from national population census. This amounts to way to many loop iterations. However, I haven't been able to use parallel effectively. In particular, I want to take advantage of the `parallel append` feature.
I am trying to do something like the command below for a bunch of files located within a folder, under the directory labeled by the global $dir, such that the collapsed_d program runs on each individual file. This has clearly not worked because the syntax is incorrect, but I haven't managed to understand how the e() option should be stated. The example in the Stata helper hasn't been helpful because of how files are stored in the example.
parallel append , do("collapsed_d.do") ///
prog(collapsed_d) e("$dir/filename_`g'.dta")
where `g' corresponds to each of the names that I want to process in parallel. In the directory $dir/ files apprear as:
filename_112.dta
filename_113.dta
:
filename_998.dta
Even more importantly, I am not sure this is the most efficient way to deal with the challenge. Any thoughts on this would also be highly appreciated.
Thank you in advance.
Rodrigo
Hope you can kindly help me with this issue.
I am trying to parallelize a process which needs to be done over many stats (mean, median, etc), years, geographical areas and countries using microdata from national population census. This amounts to way to many loop iterations. However, I haven't been able to use parallel effectively. In particular, I want to take advantage of the `parallel append` feature.
I am trying to do something like the command below for a bunch of files located within a folder, under the directory labeled by the global $dir, such that the collapsed_d program runs on each individual file. This has clearly not worked because the syntax is incorrect, but I haven't managed to understand how the e() option should be stated. The example in the Stata helper hasn't been helpful because of how files are stored in the example.
parallel append , do("collapsed_d.do") ///
prog(collapsed_d) e("$dir/filename_`g'.dta")
where `g' corresponds to each of the names that I want to process in parallel. In the directory $dir/ files apprear as:
filename_112.dta
filename_113.dta
:
filename_998.dta
Even more importantly, I am not sure this is the most efficient way to deal with the challenge. Any thoughts on this would also be highly appreciated.
Thank you in advance.
Rodrigo
Comment