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.

Defining Complex Files 1711<br />

tion, took reading tests (word identification and comprehension tests). The second<br />

student completed writing tests (handwriting, spelling, vocabulary, and grammar tests).<br />

Test code (READING or WRITING) indicates whether the record contains reading or<br />

writing scores.<br />

Table C.3 Academic test data for two students<br />

Student 1<br />

Test ID Grade Word Compre<br />

READING 1 04 65 35<br />

Student 2<br />

Test ID Grade Handwrit Spelling Vocab Grammar<br />

WRITING 2 03 50 55 30 25<br />

The following commands define the test data:<br />

FILE TYPE MIXED RECORD=TEST 1-7(A).<br />

RECORD TYPE ’READING’.<br />

DATA LIST / ID 9-10 GRADE 12-13 WORD 15-16 COMPRE 18-19.<br />

RECORD TYPE ’WRITING’.<br />

DATA LIST / ID 9-10 GRADE 12-13 HANDWRIT 15-16 SPELLING 18-19<br />

VOCAB 21-22 GRAMMAR 24-25.<br />

END FILE TYPE.<br />

BEGIN DATA<br />

READING 1 04 65 35<br />

WRITING 2 03 50 55 30 25<br />

END DATA.<br />

LIST.<br />

• FILE TYPE specifies that the data contain mixed record types. RECORD reads the<br />

record identifier (variable TEST) in columns 1 through 7.<br />

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

the file. The program reads variables ID, GRADE, WORD, and COMPRE in the record<br />

in which the value of TEST is READING, and ID, GRADE, HANDWRIT, SPELLING,<br />

VOCAB, and GRAMMAR in the WRITING record.<br />

• END FILE TYPE signals the end of file definition.<br />

• BEGIN DATA and END DATA indicate that data are inline. Data are mixed, since some<br />

column positions contain different variables for the two cases. For example, word<br />

identification score is recorded in columns 15 and 16 for student 1. For student 2,<br />

handwriting score is recorded in these columns.

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

Saved successfully!

Ooh no, something went wrong!