Learn R Programming

creditmodel (version 1.3.0)

swap_analysis: Swap Out/Swap In Analysis

Description

swap_analysis is for swap out/swap in analysis.

Usage

swap_analysis(
  dat,
  new_rules,
  old_rules,
  target = NULL,
  cross_type = "total_pct",
  value = NULL
)

Arguments

dat

A data.frame with independent variables.

new_rules

A list of new rules.

old_rules

A list of old rules.

target

The name of target variable.

cross_type

Output form of the result of crosstable. Provide these four forms: "total_sum","total_pct","bad_sum","bad_pct" .

value

The name of the variable to sum. When this parameter is NULL, the default statistics is to sum frequency.

Value

A cross table.

Examples

Run this code
# NOT RUN {
swap_analysis(dat = UCICreditCard, new_rules = list("SEX == 'male' & AGE < 25"),
 old_rules = list("SEX == 'male' & AGE < 30"),
 target = "default.payment.next.month", cross_type = "bad_pct", value = "LIMIT_BAL")
# }

Run the code above in your browser using DataLab