aplica_agrupa_nominal: aplica_agrupa_nominal

Description Usage Arguments Examples

View source: R/aplica_agrupa_nominal.R

Description

apply agrupa_nominal to a list of variables

Usage

1
2
aplica_agrupa_nominal(train_tbl, char_cols, target_name, lim_cant_categ,
  limite, symbol_to_split)

Arguments

train_tbl

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

char_cols

name of the nominal variables that you want to group.

target_name

name if the target variable.

lim_categ

probability of not belonging to the same group. Used for the hypergeometric test.

Examples

1
2
3
4
5
6
tbla<-data.frame(
grupo1=rep(c('a','b','c','d','e'),100/5),
valor=c( as.numeric(rep(runif(90), 1)>.5) , rep(0, 5), rep(1, 5)) ,
grupo2=rep(c('aa','bb','cc','cc','cc'),100/5)
)
 aplica_agrupa_nominal(train_tbl=tbla, char_cols=c('grupo1', 'grupo2'), target_name='valor', lim_cant_categ=20, limite=0.05, symbol_to_split = '%#%')

GabyP/categorizaOrdinales documentation built on Sept. 21, 2020, 1:42 p.m.