LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 17 Jul 2007 18:10:54 GMT
Reply-To:     Art@DrKendall.org
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Art Kendall <Arthur.Kendall@VERIZON.NET>
Subject:      Re: How to randomly split a whole dataset into two sub-dataset?
Comments: To: sas-l@uga.edu
In-Reply-To:  <1184650032.814382.172400@i13g2000prf.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

* create a random variable. compute ranorder= rv.uniform(1, 2E9). *sort the cases in a random order. sort cases by ranorder. *assign to groups by odd and even casenum. compute group = mod($casenum,2) . value labels group 0 'even' 1 'odd'. frequencies vars=group.

Art Kendall Social Research Consultants

zencaroline wrote: > Hi, > > At your possible convenience, might anyone please kindly answer my > question? Thank you very much. > > How to "RANDOMLY" split the whole data set (n=2000) into two sub > dataset (n=1000; n=1000) in SPSS or Excel? > > Thank you very much. > > Please take care > > Caroline >


Back to: Top of message | Previous page | Main SAS-L page