Date: Thu, 18 Jul 1996 07:30:13 -0400
Reply-To: "William B. Ware" <wbware@EMAIL.UNC.EDU>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: "William B. Ware" <wbware@EMAIL.UNC.EDU>
Subject: Re: how split files?
In-Reply-To: <199607181118.HAA112198@mailserv0.isis.unc.edu>
On Fri, 19 Jul 1996 p2125165@VMSUSER.ACSU.UNSW.EDU.AU wrote:
> I need to split my entire data into two random subsamples using
> SPSS-X. I found SAMPLE as well as SPLIT commands unsuccessful. Does
> any one know a solution? Please let me know. Thanks,
Are you actually using SPSS-X on a mainframe with syntax? or a Windows
version? I can tell you how to do it with Windows right now.
Under the DATA menu, choose SELECT CASES. Within the next menu, select
RANDOM, and then specify that you want "exactly" 200 cases out of 400
cases, assuming that you have a total of 400 cases. SPSS will write a
new variable to your data file, filter_$, which has values of 0 and 1.
You can then use this variable as a grouping variable in your later analyses.
If you using SPSS-X on a mainframe, I know that there is a SAMPLE
command, but I don't know how it works internally. You could write to
support@spss.com. On the other hand, you could generate a uniform random
varaible over the range from 0 to 1. Then create a grouping variable
with a compute statement that assigns a 1 if URV < .5, 2 otherwise.
WBW
______________________________________________________________________________
William B. Ware, Professor and Chair Educational Psychology
CB# 3500 EMAIL: wbware@unc.edu
University of North Carolina PHONE: (919)-966-5266
Chapel Hill, NC 27599-3500 FAX: (919)-962-1533
______________________________________________________________________________