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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1348 RECORD TYPE<br />

• SPREAD can be used for nested files only. SPREAD cannot be used for mixed or<br />

grouped files.<br />

• The only specification is a single keyword. YES is the default.<br />

• SPREAD=NO applies only to the record type specified on that RECORD TYPE command.<br />

The default YES is in effect for all other defined record types.<br />

YES Spread the values from the specified record type to all related cases. This is the<br />

default.<br />

NO Spread the values from the specified type only to the first related case. All other<br />

cases built from the same record are assigned the system-missing value for the variables<br />

defined on the record type.<br />

Example<br />

* A nested file.<br />

FILE TYPE NESTED RECORD=#RECID 6 CASE=ACCID 1-4.<br />

RECORD TYPE 1.<br />

DATA LIST /ACC_NO 9-11 WEATHER 12-13<br />

STATE 15-16 (A) DATE 18-24 (A).<br />

RECORD TYPE 2 SPREAD=NO.<br />

DATA LIST /STYLE 11 MAKE 13 OLD 14<br />

LICENSE 15-16 (A) INSURNCE 18-21 (A).<br />

RECORD TYPE 3.<br />

DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A)<br />

INJURY 18 SEAT 20-21 (A) COST 23-24.<br />

END FILE TYPE.<br />

BEGIN DATA<br />

0001 1 322 1 IL 3/13/88 /* Type 1: accident record<br />

0001 2 1 44MI 134M /* Type 2: vehicle record<br />

0001 3 1 34 M 1 FR 3 /* Type 3: person record<br />

0001 2 2 16IL 322F /* vehicle record<br />

0001 3 1 22 F 1 FR 11 /* person record<br />

0001 3 2 35 M 1 FR 5 /* person record<br />

0001 3 3 59 M 1 BK 7 /* person record<br />

0001 2 3 21IN 146M /* vehicle record<br />

0001 3<br />

END DATA.<br />

1 46 M 0 FR 0 /* person record<br />

• The accident record (type 1) is spread to all related cases (in this example, all cases).<br />

• The first vehicle record has one related person record. The values for STYLE, MAKE, OLD,<br />

LICENSE, and INSURNCE are spread to the case built for the person record.<br />

• The second vehicle record has three related person records. The values for STYLE, MAKE,<br />

OLD, LICENSE, and INSURNCE are spread only to the case built from the first person record.<br />

The other two cases have the system-missing values for STYLE, MAKE, OLD, LICENSE, and<br />

INSURNCE.<br />

• The third vehicle record has one related person record, and the values for type 2 records<br />

are spread to that case.

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

Saved successfully!

Ooh no, something went wrong!