Can we visualize classification and regression trees (CART) in Stata? I've found two user-written commands -- cart and crtrees -- but I'm not sure either will visualize the tree. Here's a summary of what I've learned:
crtrees. The following code (from help crtrees) produces a textual description of the notes, rather than graphical tree.
The last line also produces an error:
cart. It appears this command, last updated in 2004, was not a complete implementation of CART but intended only for failure-time data. I couldn't get it working and there are no examples in the help file, but the documentation doesn't suggest that it visualizes the tree.....
crtrees. The following code (from help crtrees) produces a textual description of the notes, rather than graphical tree.
Code:
ssc install crtrees sysuse auto, clear crtrees price trunk weight length foreign gear_ratio, seed(12345)
estimates post: matrix has missing values
Code:
ssc install cart help cart
Comment