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.

REPEATING DATA<br />

REPEATING DATA [FILE=file]<br />

/STARTS=beg col[-end col] /OCCURS={value }<br />

{varname}<br />

[/LENGTH={value }] [/CONTINUED[=beg col[-end col]]]<br />

{varname}<br />

[/ID={col loc}=varname] [/{TABLE }]<br />

{format } {NOTABLE}<br />

/DATA=variable specifications<br />

Example<br />

INPUT PROGRAM.<br />

DATA LIST / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.<br />

REPEATING DATA STARTS=12 /OCCURS=NUMVEH<br />

/DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.<br />

END INPUT PROGRAM.<br />

BEGIN DATA<br />

1001 02 02 FORD T8PONTIAC C6<br />

1002 04 01 CHEVY C4<br />

1003 02 03 CADILAC C8FORD T6VW C4<br />

END DATA.<br />

LIST.<br />

Overview<br />

REPEATING DATA reads input cases whose records contain repeating groups of data. For<br />

each repeating group, REPEATING DATA builds one output case in the working data file. All<br />

of the repeating groups in the data must contain the same type of information, although the<br />

number of groups for each input case may vary. Information common to the repeating<br />

groups for each input case can be recorded once for that case and then spread to each<br />

resulting output case. In this respect, a file with a repeating data structure is like a hierarchical<br />

file with both levels of information recorded on a single record rather than on separate<br />

record types. For information on reading hierarchical files, see FILE TYPE—END FILE<br />

TYPE.<br />

REPEATING DATA must be used within an INPUT PROGRAM structure or within a FILE<br />

TYPE structure with mixed or nested data. In an INPUT PROGRAM structure, REPEATING<br />

DATA must be preceded by a DATA LIST command. In a FILE TYPE structure, DATA LIST is<br />

needed only if there are variables to be spread to each resulting output case.<br />

1388

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

Saved successfully!

Ooh no, something went wrong!