MVACARTBan1 (R 2.12.1)

MVACARTBan1 performs classification analysis for the US bankruptcy data (CF SEC 2004; bankruptcy.dat) with 84 companies employing the Gini index and a constraint. It plots a decision tree.

Download File

Wed, April 25 2012 by Dedy Dwi Prastyo

-


Description: -


rm(list=ls(all=TRUE))
graphics.off()
install.packages("mvpart")
library(mvpart)
x = read.table("bankruptcy.dat")
xx = data.frame(x)
my.control = rpart.control(minsplit=30, usesurrogate=1, minbucket=1, maxdepth=30)
t2 = rpart(V3~V1+V2,xx,parms="gini",x=TRUE,y=TRUE,control=my.control)
 plot(t2)
 text(t2,cex=0.5)