Bin continuous data manually.

rbin_manual(data = NULL, response = NULL, predictor = NULL,
  cut_points = NULL, include_na = TRUE)

# S3 method for rbin_manual
plot(x, ...)

Arguments

data

A data.frame or tibble.

response

Response variable.

predictor

Predictor variable.

cut_points

Cut points for binning.

include_na

logical; if TRUE, a separate bin is created for missing values.

x

An object of class rbin_manual.

...

further arguments passed to or from other methods.

Value

A tibble.

Details

Specify the upper open interval for each bin. `rbin` follows the left closed and right open interval. If you want to create_bins 10 bins, the app will show you only 9 input boxes. The interval for the 10th bin is automatically computed. For example, if you want the first bin to have all the values between the minimum and including 36, then you will enter the value 37.

Examples

bins <- rbin_manual(mbank, y, age, c(29, 31, 34, 36, 39, 42, 46, 51, 56)) bins
#> Binning Summary #> --------------------------- #> Method Manual #> Response y #> Predictor age #> Bins 10 #> Count 4521 #> Goods 517 #> Bads 4004 #> Entropy 0.5 #> Information Value 0.12 #> #> #> # A tibble: 10 x 7 #> cut_point bin_count good bad woe iv entropy #> <chr> <int> <int> <int> <dbl> <dbl> <dbl> #> 1 < 29 410 71 339 -0.484 0.0255 0.665 #> 2 < 31 313 41 272 -0.155 0.00176 0.560 #> 3 < 34 567 55 512 0.184 0.00395 0.459 #> 4 < 36 396 45 351 0.00712 0.00000443 0.511 #> 5 < 39 519 47 472 0.260 0.00701 0.438 #> 6 < 42 431 33 398 0.443 0.0158 0.390 #> 7 < 46 449 47 402 0.0993 0.000942 0.484 #> 8 < 51 521 40 481 0.440 0.0188 0.391 #> 9 < 56 445 49 396 0.0426 0.000176 0.500 #> 10 >= 56 470 89 381 -0.593 0.0456 0.700
# plot plot(bins)