The BINNING Procedure

INPUT Statement

  • INPUT variables </ options>;

The INPUT statement names one or more variables as input variables for binning. PROC BINNING does not support duplicate variables. If the INPUT statement contains a duplicate variable, PROC BINNING takes only the first variable and provides a warning message.

When the values of the METHOD= option is BUCKET, QUANTILE, WINSOR, or CUTPTS, the specified variables must be interval variables. If nominal variables are provided, PROC BINNING stops and returns an error message.

When the values of the METHOD= option is TREE, the specified variables can be either interval or nominal variables.

You can specify the following options after a slash (/):

NUMBIN=integer

specifies the number of binning levels for all binning variables in the current INPUT statement. The value of integer can be any integer between 2 and 1,000, inclusive.

The number of binning levels that you specify in an INPUT statement overwrites the global number of binning levels, which is specified in the NUMBIN= option in the PROC BINNING statement (or is 16 by default).

In tree-based binning, this option is ignored.

LEVEL=INTERVAL | NOMINAL

specifies whether to treat the specified variables as interval or nominal. You can specify the following values:

INTERVAL
INT

treats all variables that are specified in this INPUT statement as interval. If the INPUT statement contains any character variables, PROC BINNING stops and returns an error message.

NOMINAL
NOM

treats all variables that are specified in this INPUT statement as nominal. If you specify LEVEL=NOMINAL and the variables in the INPUT statement are interval when the value of the METHOD= option is BUCKET, QUANTILE, WINSOR, or CUTPTS, PROC BINNING prints a warning and continues to treat the variables in the INPUT statement as interval variables.

By default, LEVEL=INTERVAL.

Last updated: September 13, 2022