FACLEVSTANDARDIZE procedure

Redefines a list of factors to coordinate their levels or labels (R.W. Payne).


Options

FREPRESENTATION = string
Whether to coordinate the factors to have the same levels, labels or (ordinal) number of levels (levels, labels, ordinals); default leve

DIRECTION = string
How to sort the levels or labels (ascending, descending, given); default asce


Parameters

FACTOR = factors
Factors to be coordinated

NEWFACTOR = factors
New factors, redefined to share the same levels or labels; if unset, the original FACTOR is redefined


Description

FACLEVSTANDARDIZE allows you to redefine a set of factors so that they have the same set of levels or labels. The original factors are listed by the FACTOR parameter, while the NEWFACTOR parameter saves the redefined factors. If no NEWFACTOR is defined for one of the factors in the FACTOR list, the original factor itself is redefined.

   The FREPRESENTATION option controls whether it is the levels or labels that must be the same for the redefined factors. Alternatively, if you set FREPRESENTATION=ordinals, the levels and labels are ignored and the factors are simply redefined so that their numbers of levels become identical. By default, FREPRESENTATION=levels.

   The DIRECTION option controls whether the set of levels or labels for the redefined factors is sorted into ascending or descending order, or whether they are kept in the order in which they are met in the FACTOR list.

 

Options: FREPRESENTATION, DIRECTION.

Parameters: FACTOR, NEWFACTOR.


Method

FACLEVSTANDARDIZE uses the SETCALCULATE directive to form the combined set of levels or labels, SORT (if necessary) to sort them, and EQUATE to transfer the values from the original to the redefined factors (matching their levels or labels as required).


Action with RESTRICT

Any restrictions are ignored.