This can be easily accomplished by using SAS Proc Surveyselect. The full SAS manual about Proc SurveySelect can be found here.
Proc surveyselect data=AllEnrolled method=srs n=50 out=random50;
Run;
Proc print data=random50 noobs;
Var SubjectID;
run;
During the statistical analyses especially the posthoc analyses, we may be asked to perform subgroup analyses by median (2 groups), tertiles (3 groups), quartiles (4 groups). For example, we may want to do a subgroup analysis of treatment comparison by baseline BMI where subjects are split into three groups (tertiles) with an equal number of subjects in each subset. This can be easily implemented by using SAS Proc Rank.
Proc Rank data=allEnrolled group = 3 out=test;
var BMI;
ranks rank_BMI;
run;
proc print data=test;
run;
The full SAS manual about Proc Rank can be found here. Two papers from SAS blogs discussed this related issue.
No comments:
Post a Comment