BookmarkSubscribeRSS Feed
R_Fraser
Calcite | Level 5

I am using SAS on9.4 (TS1M0). proc surveyselect groups= option not recognized. The following SAS example does not work! At least for me. Can anyone help?

data one;

  do x=1 to 10;

  output;

  end;

run;

proc surveyselect data=one groups=3 seed=49201 out=RandomGroups noprint;

  run;

proc freq data=RandomGroups;

  tables GroupID;

run;

Thanks,

Raphael

4 REPLIES 4
PGStats
Opal | Level 21

You can do the same this way :

data one;

  do x=1 to 10;

  output;

  end;

run;

data two / view=two;

call streaminit(49201);

set one;

rnd = rand("UNIFORM");

run;

proc rank data=two out=randomGroups(drop=rnd) groups=3;

var x;

ranks groupID;

run;

proc freq data=RandomGroups;

  tables GroupID;

run;

PG

PG
Rick_SAS
SAS Super FREQ

This option was added in SAS/STAT 13.1, which was 9.4m1. See the "What's New" in SAS/STAT(R) 13.1 User's Guide

R_Fraser
Calcite | Level 5

According to the note below the option should be available in SAS® 9.4 TS1M0 or later.

36383 - Randomly assign the observations in a data set to two or more groups

Rick_SAS
SAS Super FREQ

You could have saved us some time if you had linked to that article in your original question.

It seems, then, that your question is not "How do I do this task," but rather, "Why is the web page wrong."  I doubt that anyone on this list can answer that question, other than a generic response: "human error."

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 804 views
  • 6 likes
  • 3 in conversation