Joel Fürstenberg-Hägg
2009-Nov-24 15:27 UTC
[R] Error in text.rpart(fit) : fit is not a tree, just a root
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091124/e87b65ef/attachment-0001.pl>
Terry Therneau
2009-Nov-25 14:30 UTC
[R] Error in text.rpart(fit) : fit is not a tree, just a root
> I've tried to make a decision tree for the following data set:....> I don't get a tree...The rpart routine has decided that the best model it can find is the "intercept only" model, i.e., a tree with no branches at all. Stepwise regression can have the same outcome, by the way, if no variables pass the F-to-enter threshold. The plot and text routines won't plot anything for a null tree, because there is nothing interesting to plot. Terry Therneau