QFACTOR procedure

Allows the user to decide to convert texts or variates to factors (R.W. Payne).


Options

PRINT = strings
Controls printed output (replication, summary); default summ

MAXCATEGORY = scalar
Maximum number of distinct values that a VECTOR may contain if it is to be converted; default 10

QUERY = string
Whether to ask the user if each VECTOR with no more than MAXCATEGORY distinct values is to be converted


Parameter

VECTOR = variates or texts
Vectors to be converted into factors


Description

The QFACTOR procedure provides a convenient way of converting variates or texts to factors. The variates or texts are specified by the VECTOR parameter. The MAXCATEGORY option defines the maximum number of distinct values that each VECTOR may contain if it is to be converted (default 10). The QUERY option determines whether to ask the user whether to convert each VECTOR that has no more than MAXCATEGORY categories; with the default setting, QUERY=no, they are all converted.

   The PRINT option controls printed output, with settings:

    replication
to print the replication of the levels of each converted VECTOR;

    summary
to print the number of values and levels of each converted VECTOR or, alternatively, a comment to say that the VECTOR has not been converted.


Options: PRINT, MAXCATEGORY, QUERY.

Parameter: VECTOR.


Method

The QUESTION directive is used to obtain the user's decision, and the GROUPS directive is used to convert the variate or text to a factor.