turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Randomization to 3 unequal groups

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-05-2013 11:46 AM

I'm having a hard time understanding how to take my dataset of 6000 observations and randomize them to 3 unequal groups (1000, 1000, and 4000), and then randomize each of those into 5 equal groups (so 15 groups total). There are no strata, I only need to split the observations randomly into three unequal groups, then each of those into to five equal groups. The only variable in the dataset is ID number. I'm trying to do this with PROC SURVEYSELECT and PROC PLAN and having no luck.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-05-2013 12:10 PM

Can always do it the old fashion way, with creating a random number:

data want;

do ID=1 to 6000;

ran_number=rand('normal');

output;

end;

run;

proc sort data=want;

by ran_number;

run;

data want2;

set want;

if 1 <= _n_ <=1000 then group=1;

else if 1001 <= _n_ <=2000 then group=2;

else group=3;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-05-2013 02:41 PM

Okay, yes, that makes sense. Then I can take each of the 3 groups and do the same thing to randomize them to 5 equal groups. Thank you!