Description Usage Arguments Value Examples
It generates a data frame with a new predictive characteristic after applying
smbinning
or smbinning.custom
.
1 | smbinning.gen(df, ivout, chrname = "NewChar")
|
df |
Dataset to be updated with the new characteristic. |
ivout |
An object generated after |
chrname |
Name of the new characteristic. |
A data frame with the binned version of the original characteristic.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Load library and its dataset
library(smbinning) # Load package and its data
pop=smbsimdf1 # Set population
train=subset(pop,rnd<=0.7) # Training sample
# Binning application for a numeric variable
result=smbinning(df=train,y="fgood",x="dep") # Run and save result
# Generate a dataset with binned characteristic
pop=smbinning.gen(pop,result,"g1dep")
# Check new field counts
table(pop$g1dep)
|
Loading required package: sqldf
Loading required package: gsubfn
Loading required package: proto
Loading required package: RSQLite
Loading required package: partykit
Loading required package: grid
Loading required package: libcoin
Loading required package: mvtnorm
Loading required package: Formula
Warning message:
no DISPLAY variable so Tk is not available
01 <= 7951.11 02 <= 10180.32 03 <= 12468.41 04 > 12468.41
245 434 694 1127
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.