MISSING Subcommand (FILE TYPE-END FILE TYPE command)
MISSING
determines
whether the program issues a warning when it encounters a missing
record type for a case. Regardless of whether the program issues the
warning, it builds the case in the active dataset with system-missing
values for the variables defined on the missing record. MISSING
is optional for grouped and nested
files.
-
MISSING
cannot be used with mixed files and is optional for grouped and nested files. - For grouped and nested files, the program verifies that each defined case includes one record of each type.
- The only specification is keyword
WARN
orNOWARN
.
WARN. Issue a warning message when a record type is missing for a case. This is the default for grouped files.
NOWARN. Suppress the warning message when a record type is missing for a case. This is the default for nested files.
Example
* A grouped file with missing records.
FILE TYPE GROUPED RECORD=#TEST 6 CASE=STUDENT 1-4 MISSING=NOWARN.
RECORD TYPE 1.
DATA LIST /ENGLISH 8-9 (A).
RECORD TYPE 2.
DATA LIST /READING 8-10.
RECORD TYPE 3.
DATA LIST /MATH 8-10.
END FILE TYPE.
BEGIN DATA
0001 1 B+
0001 2 74
0002 1 A
0002 2 100
0002 3 71
0003 3 81
0004 1 C
0004 2 94
0004 3 91
END DATA.
- The data contain records for three tests administered to four students. However, not all students took all tests. The first student took only the English and reading tests. The third student took only the math test.
- One case in the active dataset is built for each of the four students. If a student did not take a test, the system-missing value is assigned in the active dataset to the variable for the missing test. Thus, the first student has the system-missing value for the math test, and the third student has missing values for the English and reading tests.
- Keyword
NOWARN
is specified onMISSING
. Therefore, no warning messages are issued for the missing records.
Example
* A nested file with missing records.
FILE TYPE NESTED RECORD=6 CASE=ACCID 1-4 MISSING=WARN.
RECORD TYPE 1.
DATA LIST /ACC_ID 9-11 WEATHER 12-13 STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2.
DATA LIST /STYLE 11 MAKE 13 OLD 14 LICENSE 15-16 (A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A) INJURY 18 SEAT 20-21 (A)
COST 23-24.
END FILE TYPE.
BEGIN DATA
0001 1 322 1 IL 3/13/88 /* accident record
0001 3 1 34 M 1 FR 3 /* person record
0001 2 2 16IL 322F /* vehicle record
0001 3 1 22 F 1 FR 11 /* person record
0001 3 2 35 M 1 FR 5 /* person record
0001 3 3 59 M 1 BK 7 /* person record
0001 2 3 21IN 146M /* vehicle record
0001 3 1 46 M 0 FR 0 /* person record
END DATA.
- The data contain records for one accident. The first record is a type 1 (accident) record, and the second record is a type 3 (person) record. However, there is no type 2 record, and therefore no vehicle associated with the first person. The person may have been a pedestrian, but it is also possible that the vehicle record is missing.
- One case is built for each person record. The first case has missing values for the variables specified on the vehicle record.
- Keyword
WARN
is specified onMISSING
. A warning message is issued for the missing record.