The TRANSREG Procedure

OPSCORE, MONOTONE, UNTIE, and LINEAR Transformations

Two vectors of information are needed to produce the optimally scaled variable: the initial variable scaling vector bold x and the target vector bold y. For convenience, both vectors are first sorted on the values of the initial scaling vector. If you request an UNTIE transformation, the target vector is sorted within ties in the initial scaling vector. The normal SAS collating sequence for missing and nonmissing values is used. Sorting simply permits the constraints to be specified in terms of relationships among adjoining coefficients. The sorting process partitions bold x and bold y into missing and nonmissing parts left-parenthesis bold x prime Subscript m Baseline bold x prime Subscript n right-parenthesis prime, and left-parenthesis bold y prime Subscript m Baseline bold y prime Subscript n right-parenthesis prime.

Next, PROC TRANSREG determines category membership. Every ordinary missing value (.) forms a separate category. (Three ordinary missing values form three categories.) Every special missing value within the range specified in the UNTIE= a-option forms a separate category. (If UNTIE= BC and there are three .B and two .C missing values, five categories are formed from them.) For all other special missing values, a separate category is formed for each different value. (If there are four .A missing values, one category is formed from them.)

Each distinct nonmissing value forms a separate category for OPSCORE and MONOTONE transformations (1 1 1 2 2 3 form three categories). Each nonmissing value forms a separate category for all other transformations (1 1 1 2 2 3 form six categories). When category membership is determined, category means are computed. Here is an example:

bold x: (. . .A .A .B 1 1 1 2 2 3 3 3 4)’
bold y: (5 6  2  4  2 1 2 3 4 6 4 5 6 7)’
OPSCORE and
MONOTONE means: (5 6  3     2 2     5   5     7)’
other means: (5 6  3     2 1 2 3 4 6 4 5 6 7)’

The category means are the coefficients of a category indicator design matrix. The category means are the Fisher (1938) optimal scores. For MONOTONE and UNTIE transformations, order constraints are imposed on the category means for the nonmissing partition by merging categories that are out of order. The algorithm checks upward until an order violation is found, and then averages downward until the order violation is averaged away. (The average of x overbar Subscript 1 computed from n 1 observations and x overbar Subscript 2 computed from n 2 observations is left-parenthesis n 1 x overbar Subscript 1 Baseline plus n 2 x overbar Subscript 2 Baseline right-parenthesis slash left-parenthesis n 1 plus n 2 right-parenthesis.) The MONOTONE algorithm (Kruskal 1964, secondary approach to ties) for this example with means for the nonmissing values left-parenthesis 2 5 5 7 right-parenthesis prime would do the following checks: 2 less-than 5: OK, 5 equals 5: OK, 5 less-than 7: OK. The means are in the proper order, so no work is needed.

The UNTIE transformation (Kruskal 1964, primary approach to ties) uses the same algorithm on the means of the nonmissing values left-parenthesis 1 2 3 4 6 4 5 6 7 right-parenthesis prime but with different results for this example: 1 less-than 2: OK, 2 less-than 3: OK, 3 less-than 4: OK, 4 less-than 6: OK, 6 greater-than 4: average 6 and 4 and replace 6 and 4 by the average. The new means of the nonmissing values are left-parenthesis 1 2 3 4 5 5 5 6 7 right-parenthesis prime. The check resumes: 4 less-than 5: OK, 5 equals 5: OK, 5 equals 5: OK, 5 less-than 6: OK, 6 less-than 7: OK. If some of the special missing values are ordered, the upward-checking, downward-averaging algorithm is applied to them also, independently of the other missing and nonmissing partitions. When the means conform to any required category or order constraints, an optimally scaled vector is produced from the means. The following example results from a MONOTONE transformation:

bold x: (. . .A .A .B 1 1 1 2 2 3 3 3 4)prime
bold y: (5 6  2  4  2 1 2 3 4 6 4 5 6 7)prime
result: (5 6  3  3  2 2 2 2 5 5 5 5 5 7)prime

The upward-checking, downward-averaging algorithm is equivalent to creating a category indicator design matrix, solving for least squares coefficients with order constraints, and then computing the linear combination of design matrix columns.

For the optimal transformation LINEAR and for nonoptimal transformations, missing values are handled as just described. The nonmissing target values are regressed onto the matrix defined by the nonmissing initial scaling values and an intercept. In this example, the target vector y Subscript n Baseline equals left-parenthesis 1 2 3 4 6 4 5 6 7 right-parenthesis prime is regressed onto the design matrix

Start 2 By 9 Matrix 1st Row 1st Column 1 2nd Column 1 3rd Column 1 4th Column 1 5th Column 1 6th Column 1 7th Column 1 8th Column 1 9th Column 1 2nd Row 1st Column 1 2nd Column 1 3rd Column 1 4th Column 2 5th Column 2 6th Column 3 7th Column 3 8th Column 3 9th Column 4 EndMatrix prime

Although only a linear transformation is performed, the effect of a linear regression optimal scaling is not eliminated by the later standardization step (unless the variable has no missing values). In the presence of missing values, the linear regression is necessary to minimize squared error.

Last updated: December 09, 2022