Date: Thu, 2 Oct 2003 11:43:25 -0500
Reply-To: "Laura Berry, Dr." <LBERRY@northark.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Laura Berry, Dr." <LBERRY@northark.edu>
Subject: multiple variables in one frequency table
Content-Type: text/plain; charset="US-ASCII"
Hello:
The syntax below is from Raynald's great site. The syntax is designed
to put 4 variables in increasing order in the same frequency table. It
works perfectly as written, and I thought it would be an easy matter to
adapt it for use with an existing data set. However, the XSAVE command
hangs up when I try this with an existing dataset. Even if I generate
the data as shown in the syntax (command lines DATA LIST LIST through
VALUE LABELS) then save the set and run the rest of the syntax, the
program (and my computer) crash.
I would be grateful for some help in modifying the syntax for use with
an existing dataset.
Thanks,
Laura
Laura Berry, Ed.D.
Director of Institutional Research & Assessment
North Arkansas College
lberry@northark.edu ph: 870-391-3280 fax: 870-391-3250
DATA LIST LIST /id sigaret sigar pipe shag.
BEGIN DATA
1 1 1 0 1
2 0 1 0 1
3 0 1 0 0
4 0 1 0 0
END DATA.
LIST.
VALUE LABELS sigaret TO shag 0 'No' 1 'Yes'.
* Basic Tables.
VECTOR v=sigaret TO shag.
LOOP #cnt=1 TO 4.
COMPUTE smoke=v(#cnt)*#cnt.
XSAVE OUTFILE='c:\temp\temp.sav' /KEEP=id smoke.
END LOOP.
EXECUTE.
GET FILE='c:\temp\temp.sav'.
VALUE LABEL smoke 1 'sigaret' 2 'sigar' 3 'pipe' 4 'shag'.
TEMPORARY.
SELECT IF smoke<>0.
FREQUENCIES
VARIABLES=smoke
/FORMAT=DFREQ
/ORDER= ANALYSIS .