Description Usage Arguments Details Value Examples
Verify if a list of bins is monotonic in terms of default rates. The function
is_monotonic
returns a boolean indicating TRUE if the default rates
exhibit a monotonic trend.
1 | is_monotonic(list_of_bins, decreasing = TRUE, verbose = FALSE)
|
list_of_bins |
A list of bins. Every bin object contains a default rate. |
decreasing |
A boolean. Should the monotonicity test verify a decrease or increase in default rates? |
verbose |
A boolean. If set to TRUE, prints a matrix of default rates along with a binary indicator displaying 1 where the monotonic relationships fails to hold. |
A list of bins of length N contains N default rates. The monotonic condition tested by this function examines whether the N default rates decrease (or increase) for each consecutive default rate in the list. The test is non-strict, meaning that if the default rates between any two adjacent bins are equal this is not considered a breach of monotonicity.
A boolean. TRUE indicates a monotonic development in default rates
across all bins in list_of_bins
.
1 2 3 | # create a set of initial bins and verify where monotonicity fails
bins <- create_initial_bins(bin_data, 30, "score", "default")
is_monotonic(bins, verbose = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.