We have physician data with taxID and need to split them equally to two groups. We want to keep the physicians together under same taxID. First, we use the below coding to assign 0 and 1 based on taxID. proc surveyselect data=test samprate=0.50 seed=49201 out=Sample outall method=srs noprint; run; Then, they ask whether we could have a list which also consider the size of taxID(the physicians number), because each taxID have a vary number of physicians. For example, they probably have 1 physician or 20 physicians under each taxID. So, the current question is how to split all of the taxID to 2 groups randomly, which also make sure they have similiar amount physicians under each group. Thanks, Kui
... View more