[R] tree()...binary reponse giving only one split

Seth sjmyers at syr.edu
Sun Jan 24 07:35:16 CET 2010


Hi,
I'm new to CART.  I have a data set with a binary reponse (0/1) and several
predictors.  I chose 2 continuous predictors to start and used the following
code.

testdata.ltr<-tree(nondev85dev06~dist_rampm_wa + dis_prim_wa,testdata)

The two predictors should be quite explanatory based upon previous work. 
After running this code, I am getting only one split using the first
predictor listed.  I've tried this with other sets of 2 and 3 predictors and
it is always the same case, only one is used for a single split.  I thought
perhaps it was the binary nature of my data set.  So, I constructed another
where the response was 0,1, or 2.  I got the same result.  I've also tried
the same experiment with predictors that are binary and got the same
results.  I've searched the help but can't find any answers. Thanks. Seth
-- 
View this message in context: http://n4.nabble.com/tree-binary-reponse-giving-only-one-split-tp1288546p1288546.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list