This is an example, this divides a 20 obs data set into .7-.3 proportions: /*The following steps will allow you to divide data into multiple Random subsets with a give proportion*/ data hello; do i= 1 to 20; output; end; run; proc surveyselect data=hello out=chao method=srs samprate=.7 outall noprint; run; /*this steps creates a new variable named "Selected" which can be referenced later on*/ data train; set chao; if selected = 1; drop selected; run; data valid; set chao; if selected = 0; drop selected; run; proc print data=train; run; proc print data=valid; run;
... View more