Example 9.10: more regression trees and recursive partitioning with "partykit"

We discuss recursive partitioning, a technique for classification and regression using a decision tree in section 6.7.3 of the book. Support for these methods is available within the rpart package. Torsten Hothorn and Achim Zeileis have extended the support for these methods with the partykit package, which provides a toolkit with infrastructure for representing, summarizing, and visualizing tree-structured regression and classification models.

In this entry, we revisit the example from the book, which worked to classify predictors of homelessness in the HELP study.

Using the partykit package, we can make a nice graphic describing these results. We’ll use the plot.party() function on a party object (coerced from the rpart object generated above using as.party()). This provides more information about the tree (as seen in the Figure above).