Hey guys.
So I've made a long do-file and I was wondering if there were a clever way to repeat parts of the do-file with a few changes? I'm doing a series of cross-national tests and I want to see what happens if I drop a single country and run all the tests again.
Basicly I want this
use file.dta
doing all sorts of recodes and preperations
LOOP HERE
[[[drop if country==18]]] <-- this is the part that I want the second loop in the do-file to include before
doing all sorts of regressions and tests
LOOP HERE
exit
Does it make any sense?
So I've made a long do-file and I was wondering if there were a clever way to repeat parts of the do-file with a few changes? I'm doing a series of cross-national tests and I want to see what happens if I drop a single country and run all the tests again.
Basicly I want this
use file.dta
doing all sorts of recodes and preperations
LOOP HERE
[[[drop if country==18]]] <-- this is the part that I want the second loop in the do-file to include before
doing all sorts of regressions and tests
LOOP HERE
exit
Does it make any sense?