Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DATA LIST and string variables problem

824 views
Skip to first unread message

Andrew Patrick

unread,
Oct 29, 1996, 3:00:00 AM10/29/96
to

I think this is a simple one but has got me stumped.

Environment: SPSS UNIX Version 6.1, Solaris 2.5

I am trying to read in a data set that contains both numeric and
string data in a free-field format. My DATA LIST line looks like
this (48 variables):

DATA LIST FILE=test4.dat LIST /
age
agenda
agenused
allqual
audqual
cmpbroad
cmplect
contint
contqual
duration
expertis
followup
gender
group
howhear1 (A20)
howhear2 (A20)
howhear3 (A20)
howhear4 (A20)
howhear5 (A20)
imprtaud
imprtvid
imprtwrk
interrup
joinrea1 (A20)
joinrea2 (A20)
joinrea3 (A20)
joinrea4 (A20)
joinrea5 (A20)
linspeed
location
meettime
meetwork
othsess
othsys1 (A20)
othsys2 (A20)
othsys3 (A20)
othsys4 (A20)
othsys5 (A20)
othtasks
partic
partopp
sameday
turns
usedbefo
usedfreq
vidqual
viewalon
workqual
.


When I run this command I keep getting

>Error # 4385 on line 3. Command name: DATA LIST
>More variables appeared in the variable list than formats were specified
>for.

Even though the number of variables in the DATA LIST and in the data
file do match. In the SPSS manual it says something about preceeding
string variables with a '*' character in the DATA LIST command (e.g.,
"* howhear1 (A20)"), but doing this produces:

>Error # 4111 on line 17 in column 2. Text: *
>Unrecognized text appears on the DATA LIST command where only a slash
('/')
>or a variable list was permitted.

So, what is the trick here?

--
Andrew Patrick, Ph.D. <and...@calvin.dgbt.doc.ca>
Networks Services & Interfaces Laboratory
Communications Research Centre
http://debra.dgbt.doc.ca/

Jonathan Fry

unread,
Oct 30, 1996, 3:00:00 AM10/30/96
to
[snip]
--
The trick is to enclose the asterisk in parentheses, so one sequence is
"(*) howhear1 (A20)".

Explanation: the DATA LIST command needs a format for each variable.
After, say five numeric variables and a string variable, it will need
six formats. The asterisk says "Assign the default format (F8.2) to all
previous unformatted variables." So, when the parser gets to the A20
format above, it only needs one format, the one for howhear1.

It must be in parentheses because it is a format specification (or at
least it functions as one), and format specifications are in
parentheses.

--------------------
Jonathan Fry
SPSS Inc.
j...@spss.com

Chiocchio Francois

unread,
Nov 7, 1996, 3:00:00 AM11/7/96
to

Hello all! I have a question cuncerning CLUSTER analysis. (I use SPSS on a
UNIX mainframe). I try to perform a cluster analysis to find out how I
could group ITEMS on a questionnaire. Even if I have a SPSS reference
book I can not seem to get clusters of items, I only get clusters of
subjects.
What am I doing wrong ?
Thank you for your help.

--------sorry for the poor language : french is my main thing-----------
========================================================================
Francois Chiocchio University of Montreal, Quebec, Canada
chio...@ERE.UMontreal.CA Department of Psychology
========================================================================
(U of M has no part, whatsoever, in the opinions expressed here)
========================================================================

David Nichols

unread,
Nov 7, 1996, 3:00:00 AM11/7/96
to

In article <55rgao$l...@epervier.cc.umontreal.ca>,

Chiocchio Francois <chio...@ERE.UMontreal.CA> wrote:
>Hello all! I have a question cuncerning CLUSTER analysis. (I use SPSS on a
>UNIX mainframe). I try to perform a cluster analysis to find out how I
>could group ITEMS on a questionnaire. Even if I have a SPSS reference
>book I can not seem to get clusters of items, I only get clusters of
>subjects.
>What am I doing wrong ?

CLUSTER does clustering on cases, or from a matrix of distances. There are
two ways you can make it do what you want. One is to FLIP the data file so
that cases become variables and variables become cases, and then use CLUSTER.
The other is to use PROXIMITIES first to compute a matrix of distances among
the variables, using VIEW=VARIABLE as a subcommand.

--
-----------------------------------------------------------------------------
David Nichols Senior Support Statistician SPSS, Inc.
Phone: (312) 329-3684 Internet: nic...@spss.com Fax: (312) 329-3668
-----------------------------------------------------------------------------

Richard F Ulrich

unread,
Nov 7, 1996, 3:00:00 AM11/7/96
to

Francois Chiocchio (chio...@ERE.UMontreal.CA) wrote:
: Hello all! I have a question cuncerning CLUSTER analysis. (I use SPSS on a
: UNIX mainframe). I try to perform a cluster analysis to find out how I
: could group ITEMS on a questionnaire. Even if I have a SPSS reference
: book I can not seem to get clusters of items, I only get clusters of
: subjects.
: What am I doing wrong ?

I think that you have been misled by the label, "cluster", and what
you really want are the results you will get from a FACTOR ANALYSIS.

For data where you seek "common factors", use Option PA2. And
VARIMAX rotation will show the same factors from a second point of
view.


Rich Ulrich, biostatistician wpi...@pitt.edu
Western Psychiatric Inst. and Clinic Univ. of Pittsburgh


Peter Muessig-Trapp

unread,
Nov 8, 1996, 3:00:00 AM11/8/96
to

In article <55rgao$l...@epervier.CC.UMontreal.CA>,
chio...@ERE.UMontreal.CA (Chiocchio Francois) wrote:


> UNIX mainframe). I try to perform a cluster analysis to find out how I
> could group ITEMS on a questionnaire. Even if I have a SPSS reference
> book I can not seem to get clusters of items, I only get clusters of
> subjects.

PROXIMITIES
var1 var2 var3
/MATRIX OUT ('Harddisk:spssclus.tmp')
/VIEW=VARIABLE /* <----- this manages your problem!
/MEASURE=SEUCLID
/PRINT NONE
/STANDARDIZE=NONE .

-> CLUSTER
-> /MATRIX IN ('Harddisk:spssclus.tmp')
-> /METHOD WARD
-> /PRINT SCHEDULE
-> /PLOT DENDROGRAM.

--
_____________________________________________________________________
Peter Muessig-Trapp, HIS GmbH, Goseriede 9, 30159 Hannover, Germany
e-mail: mue...@his.de phone: +49-511-1220193 fax: +49-511-1220250

0 new messages