Skip to content

Error in text.rpart(fit) : fit is not a tree, just a root

1 message · Terry Therneau

#
....
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