27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1708 Appendix C<br />

• The output from the LIST command is shown in Figure C.6.<br />

Figure C.6 LIST output for GROUPED.DAT<br />

STUDENT READING MATH SCIENCE<br />

1 58 59 97<br />

2 43 88 45<br />

3 67 75 90<br />

Using FILE TYPE GROUPED<br />

To use FILE TYPE GROUPED to define a grouped file, each record must have a case<br />

identifier and a record code. In the following commands, each data record contains a<br />

student ID number coded 1, 2, or 3 and a code indicating whether the score on that<br />

record is a reading (R), math (M), or science (S) score:<br />

FILE TYPE GROUPED RECORD=#REC 3(A) CASE=STUDENT 1.<br />

RECORD TYPE ’R’.<br />

DATA LIST / READING 5-6.<br />

RECORD TYPE ’M’.<br />

DATA LIST / MATH 5-6.<br />

RECORD TYPE ’S’.<br />

DATA LIST / SCIENCE 5-6.<br />

END FILE TYPE.<br />

BEGIN DATA<br />

1 R 58<br />

1 M 59<br />

1 S 97<br />

2 R 43<br />

2 M 88<br />

2 S 45<br />

3 R 67<br />

3 M 75<br />

3 S 90<br />

END DATA.<br />

LIST.<br />

• FILE TYPE indicates that data are in grouped format. RECORD defines the variable<br />

containing record codes as string variable #REC in column 3. CASE defines the case<br />

identifier variable STUDENT in the first column of each record.<br />

• One pair of RECORD TYPE and DATA LIST statements appears for each record type<br />

in the file. The program reads reading score in every R record, math score in M<br />

records, and science score in S records.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!