Date: Fri, 8 May 2009 18:16:18 -0400
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: split sample dataset into several folds for cross validation
Content-Type: text/plain; charset="us-ascii"
Have you tried the SAMPSIZE option instead of SAMPRATE? You could compute that and save it to a SAS Macro variable.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Gary
Sent: Friday, May 08, 2009 8:37 AM
Subject: Re: split sample dataset into several folds for cross validation in SAS
Thanks for the reply. I tried, and I can divide the sample into 10 folds, but the problem is that in each folder there is different percentage of response. In my case, sample is 36000, and the total response is 240. After I split into 10 folds, one fold could have 38 response and the other one could have only 18. I tried surveyselect as suggested by David Cassell, but still have the same problem.
proc surveyselect data=sampledata
strata response ;