performance_bivariado_dummies_log: performance_bivariado_dummies_log

Description Usage Arguments Examples

View source: R/performance_bivariado_dummies_log.R

Description

group values of categorical variables according to a target variable .

Usage

1
2
performance_bivariado_dummies_log(tbla, variable_name, target_name,
  limite_steps)

Arguments

tbla

table with data. It has to have the variable and the target variable.

variable_name

name of the variable that you want to analyze.

target-name

name of the target variable.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(1)
x1 = rnorm(1000)
x2 = rnorm(1000)
x3= ifelse(as.factor(x2>0.5)==T, 'A', 'B')
 z = 1 + 2 * x1 + 3 * x2
pr = 1/(1+exp(-z))
y = rbinom(1000,1,pr)
tbla = data.frame(y=y,x1=x1,x2=x2, x3=x3)
tbla[ 1:10, 'x1']<-NA  #generate NA
tbla[ 10:20, 'x3']<-''  #generate NA
performance_bivariado_dummies_log (tbla, variable_name='x3',target_name='y' )

GabyP/preparation4modeling documentation built on Sept. 24, 2020, 11:57 p.m.