QRS Toolbox for Excel

QRS.BIN.​MANUAL


Free function   Client-side function

Returns the frequency table for data binned manually.

Syntax

QRS.BIN.​MANUAL(​x, y, binkey, [binnum], [option name], [option value], …)

x[any]
Vector containing the values of the variable to be binned.
y[number]
Vector containing the values of the binary dependent variable. Leave blank if not applicable.
binkey[any]
Vector containing the binning keys. Numbers are intrepreted as lower bounds for numerical values. Strings are interpreted as lookups or regular expressions for text values. See the Remarks section for details.
binnum[number]optional
Vector containing the bin numbers. Bins are returned in ascending order of bin number. Bins that share the same bin number are merged.
option name/valueoptional
The name or value of an option. See the Options section for details.

Options

  • STRAY: TRUE to include a bin for values not covered by any binning key.
  • HEADER: TRUE to include a header row in the output.
  • TOTAL: TRUE to include a total row in the output. The cell in the WOE column contains the information value (IV).
  • COLS: String of comma-separated flags to include only selected columns in the output. The possible flags are:
    • NO for bin number.
    • DESC for description.
    • N for frequency.
    • N0 for frequency of zeros in y.
    • N1 for frequency of ones in y.
    • P for proportion of ones in y.
    • WOE for weight of evidence, which is log-odds of the bin minus overall log-odds, where odds is N1/N0.
  • EXC: TRUE to define numerical bins using exclusive (keyn < x ≤ keyn+1) rather than inclusive (keyn ≤ x < keyn+1) lower bounds.

Remarks

  • Blank cells are read as zeros and dates are read as numbers due to Excel limitations.
  • The length of x must be the same as the length of y, if applicable.
  • The length of binkey must be the same as the length of binnum, if applicable.
  • Strings in binkey that match regular expression literals in JavaScript syntax are interpreted as regular expressions for text values.
  • Strings in binkey that match "-Infinity" in lower, upper, or mixed case are interpreted as the lower bound of negative infinity for numerical values.
  • Text values are binned using the first matching key in binkey.

Examples

Get from AppSource


Get it from Microsoft AppSource

Get from Excel


  1. Click Insert > Get Add-ins
  2. Search for QRS Toolbox
  3. Click Add