Hi,
 
I am new to R and am using the ctree() function to do customer
segmentation.  I am using the following code to generate the tree:
 
treedata$Response<-factor(treedata$Conversion)
fit<-ctree(Response ~
.,controls=ctree_control(mincriterion=0.99,maxdepth=4),data=treedata)
plot(fit)
print(fit)
 
The variable "Response" above equals 1 if the customer responded to an
offering and 0 otherwise.  Everything works great, however I am
struggling to extract the information I need from the output.  When I
look at the output from print(fit) I see things similar to:
 
4) age <=42; criterion 1, statistic = 73.055
  5)* weights = 5843
 
What this is telling me is that 5,843 customers ended up being
classified into the group labeled 5.  What I would really like to know,
however, is what proportion of this 5,843 had Response=1 and what
proportion had Response=0 so that I could make some inference about the
P(Response) for customers that match the demographic characteristics of
each terminal node.
 
Any help on how to extract this information would be greatly appreciated
-- thanks!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to