Hello, I'm trying to use the gsample function to sample villages from a household-level data set, stratified by 2 parameters (remote, which is a 0/1 variable, and region, which has 9 categories). When I used the function to sample household by the stratifying criteria, it worked great:
set seed 475
gsample 5, wor strata(remote region)
when I added the command to cluster around villages (locid), I started getting strange results --- specifically, no matter how I change the seed, mostly the same villages are chosen as clusters. Even though there are 116 villages in the data set evenly distributed across regions. This version also only worked when I left out the wor option to sample without replacement.
set seed 475
gsample 5, cluster(locid) strata(remote region)
I tried another method of collapsing the data set down to villages and sampling villages directly, but I got an error message that the number of observations was too small for the sampling categories I need.
I would greatly appreciate any advice on how to do this! Maybe there's something wrong in how a wrote out the command, or maybe there's a different function that will better fit my needs?
set seed 475
gsample 5, wor strata(remote region)
when I added the command to cluster around villages (locid), I started getting strange results --- specifically, no matter how I change the seed, mostly the same villages are chosen as clusters. Even though there are 116 villages in the data set evenly distributed across regions. This version also only worked when I left out the wor option to sample without replacement.
set seed 475
gsample 5, cluster(locid) strata(remote region)
I tried another method of collapsing the data set down to villages and sampling villages directly, but I got an error message that the number of observations was too small for the sampling categories I need.
I would greatly appreciate any advice on how to do this! Maybe there's something wrong in how a wrote out the command, or maybe there's a different function that will better fit my needs?
Comment