Dear all,
I want to process a simple idea, but I have real difficulties to operate it into Stata.
The idea: Imagine a set of 500 schools for which I randomly assign 12 enumerators that have to visit those schools. But for each school I also want to randomly assign an enumerator (from the same list) that will check the work of the first selected enumerator. In other words, for each school I want to randomly assign one enumerator and a second one from the same pool of enumerators but obvioulsy excluding the first one. For example, if enumerator 5 is firstly randomly selected I want to selected an enumerator code between [1-12] excluding 5.
Is there a simple way to code that?
Thanks a lot for any help you could provide,
Best
Code example:
clear all
set obs 500
gen School = _n
gen EnumeratorCode = runiformint(1,12)
gen EnumeratorCode_Check = . //This is where I'm stuck
I want to process a simple idea, but I have real difficulties to operate it into Stata.
The idea: Imagine a set of 500 schools for which I randomly assign 12 enumerators that have to visit those schools. But for each school I also want to randomly assign an enumerator (from the same list) that will check the work of the first selected enumerator. In other words, for each school I want to randomly assign one enumerator and a second one from the same pool of enumerators but obvioulsy excluding the first one. For example, if enumerator 5 is firstly randomly selected I want to selected an enumerator code between [1-12] excluding 5.
Is there a simple way to code that?
Thanks a lot for any help you could provide,
Best
Code example:
clear all
set obs 500
gen School = _n
gen EnumeratorCode = runiformint(1,12)
gen EnumeratorCode_Check = . //This is where I'm stuck
Comment