log_trans: Logarithmic transformation

Description Usage Arguments Value Examples

View source: R/data_transformation.R

Description

log_trans is for logarithmic transformation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
log_trans(
  dat,
  target,
  x_list = NULL,
  cor_dif = 0.01,
  ex_cols = NULL,
  note = TRUE
)

log_vars(dat, x_list = NULL, target = NULL, cor_dif = 0.01, ex_cols = NULL)

Arguments

dat

A data.frame.

target

The name of target variable.

x_list

A list of x variables.

cor_dif

The correlation coefficient difference with the target of logarithm transformed variable and original variable.

ex_cols

Names of excluded variables. Regular expressions can also be used to match variable names. Default is NULL.

note

Logical, outputs info. Default is TRUE.

Value

Log transformed data.frame.

Examples

1
2
dat = log_trans(dat = UCICreditCard, target = "default.payment.next.month",
x_list =NULL,cor_dif = 0.01,ex_cols = "ID", note = TRUE)

creditmodel documentation built on Jan. 7, 2022, 5:06 p.m.