desc.stat {monobinShiny}R Documentation

Descriptive statistics

Description

desc.stat returns the descriptive statistics of numeric risk factor. Reported metrics covers mainly univariate and part of bivariate analysis which are usually standard steps in credit rating model development. Metrics are reported for special (if exists) and complete case groups separately. Report includes:

Usage

desc.stat(x, y, sc = c(NA, NaN, Inf), sc.method = "together")

Arguments

x

Numeric risk factor.

y

Numeric target vector (binary or continuous).

sc

Numeric vector with special case elements. Default values are c(NA, NaN, Inf). Recommendation is to keep the default values always and add new ones if needed. Otherwise, if these values exist in x and are not defined in the sc vector, function will report the error.

sc.method

Define how special cases will be treated, all together or in separate bins. Possible values are "together", "separately".

Value

Data frame of descriptive statistics metrics, separately for complete and special case groups.

Examples

suppressMessages(library(monobinShiny))
data(gcd)
desc.stat(x = gcd$age, y = gcd$qual)
gcd$age[1:10] <- NA
gcd$age[50:75] <- Inf
desc.stat(x = gcd$age, y = gcd$qual, sc.method = "together")
desc.stat(x = gcd$age, y = gcd$qual, sc.method = "separately")


[Package monobinShiny version 0.1.0 Index]