This error can occur when the REF= option is used in the CLASS statement in a modeling procedure. The most common reasons for the occurrence of this error are:
- When the CLASS variable referred to in the error message has an associated format. If you specify the unformatted value in the REF= option, this error will be issued. Specify the formatted value instead as further discussed and illustrated in the first section of this note.
- Incorrect spelling, missing leading or trailing blanks, or incorrect use of upper- or lower-case letters when specifying the reference value. The specified value must exactly match the value in the data.
- When you properly specify the reference level for a level that is not available because missing or invalid values in other variables involved in the model cause those observations to be ignored and the ignored observations include all of the observations in the desired reference level. Most modeling procedures provide a count of the observations read and the number used. A discrepancy in these values indicates that some observations were deleted due to missing or invalid values. Most modeling procedures produce a Class Level Information table which displays the available levels for each of the CLASS variables. With this table you can see if one or more levels of a variable is not available in the set of observations that the procedure can use to fit the model.
Note that using PROC FREQ to produce a one-way table of the CLASS variable or a two-way table of the CLASS and response variables does not assess the last issue above. This is because a such tables ignore the other variables involved in the model. PROC FREQ will use all non-missing observations to produce those tables, unaware that many additional observations must first be ignored due to missing or invalid values in other variables.