Nested Files with Missing Records

In a nested file, some cases may be missing one or more record types defined in RECORD TYPE commands. For example, in the figure below the region record for salespersons Jones and Gregory is missing.

Figure 1. File NESTED.DAT with missing records
Y   1988 
P   JONES      900
P   GREGORY    400
R   BATON ROUGE 
P   RODRIGUEZ  300
P   SMITH      333
P   GRAU       100

The program assigns missing values to variables that are not present for a case. Using the modified NESTED.DAT file, the commands in the previous example produce the output shown below. You can see that the program assigned missing values to REGION for Jones and Gregory.

Figure 2. LIST output for nested data with missing records
YEAR REGION      SALESPER  SALES

1988             JONES      900
1988             GREGORY    400
1988 BATON ROUGE RODRIGUEZ  300
1988 BATON ROUGE SMITH      333
1988 BATON ROUGE GRAU       100

You may want to examine cases with missing records, since these cases may indicate data errors. If you add the MISSING=WARN subcommand to your FILE TYPE command, the program prints a warning message when a case is missing a defined record type. For example, the program would print two warnings when processing data in NESTED.DAT with missing records. When MISSING is set to WARN, cases are built in the same way as when the default setting (NOWARN) is in effect.