variable_cluster_plus: Append information value / numeric R-squared to variable...

Description Usage Arguments Value See Also Examples

View source: R/variable_cluster_plus.R

Description

variable_cluster_plus appends a named list of information values or numeric R-squared values to a variable cluster data frame.

Usage

1

Arguments

vc

mt_variable_cluster object

x

list; all elements must inherit either mt_infoValue or mt_nrsq; element names should be found in the VarName column in vc

Value

A data frame with classes "mt_variable_cluster_plus and either "binary" or "continuous" (depending on whether x contains "mt_infoValue" or "mt_nrsq" objects, respectively). The returned object appends the values and ranks from x to vc.

See Also

variable_cluster, woe, infoValue, nrsq, lapply

Examples

1
2
3
4
5
6
7
8
9
# example with infoValue
vc <- variable_cluster(mtcars, 3)
x <- lapply(mtcars[names(mtcars) != "vs"], woe, y = mtcars$vs)
x <- lapply(x, infoValue)
variable_cluster_plus(vc, x)

# example with nrsq
x <- lapply(mtcars[names(mtcars) != "mpg"], nrsq, y = mtcars$mpg)
variable_cluster_plus(vc, x)

dnegrey/miscTools documentation built on Sept. 19, 2017, 12:15 a.m.