SETRELATE directive
Compares the distinct values contained in two data structures.
Options
Parameters
Description
SETRELATE can compare the distinct values of any numerical structure (scalar, variate, table, matrix, diagonal matrix or symmetric matrix) with another numerical structure or with a factor. It can compare a factor either with another factor, or with a variate or a text. It can compare a text with another text. Or the final possibility is to compare two pointers.
When comparing two factors, the FREPRESENTATION option specifies whether to use levels, labels or ordinal values. (The ordinal values are formed representing the levels, in numerical order, by the numbers 1, 2 and so on.) By default levels are used.
The TOLERANCE option defines the tolerance to be used when comparing numbers. The default value 10-6 should be suitable, however, unless the numbers are very small.
The LEFT and RIGHT parameters specify the structures to compare. The other parameters provide the results of the comparison as scalars containing the values 0 or 1. CONTAINS is set to 1 if the LEFT structure contains every (distinct) value in the RIGHT structure. EQUALS returns 1 if the sets of distinct values in the LEFT and RIGHT structures are identical. INCLUDEDIN equals 1 if the RIGHT structure contains every (distinct) values in the LEFT structure.
Options: FREPRESENTATION, TOLERANCE.
Parameters: LEFT, RIGHT, CONTAINS, EQUALS, INCLUDEDIN.
Action with
RESTRICT
SETRELATE ignores any restrictions on LEFT or RIGHT vectors.