rpart trees.row.names of frame contain the (unique) node numbers that
follow a binary ordering indexed by node depth.
Columns of frame include
var, a factor giving the names of the variables used in the
split at each node (leaf nodes are denoted by the level "" ),
n, the number of observations reaching the node,
wt, the sum of case weights for observations reaching the node,
dev, the deviance of the node,
yval, the fitted value of the response at the node,
and splits, a two column matrix of left and right split labels
for each node. Also included in the frame are complexity, the
complexity parameter at which this split will collapse, ncompete,
the number of competitor splits recorded, and nsurrogate, the
number of surrogate splits recorded. Extra response information which may be present is in yval2,
which contains the number of events at the node (poisson tree), or a
matrix containing the fitted class, the class counts for each node,
the class probabilities and the
frame corresponding to
the leaf node that each observation falls into.update(tree).c("terms", "formula") (see
terms.object) summarizing the formula. Used by various
methods, but typically not of direct relevance to users.count, the number of
observations (which are not missing and are of positive weight) sent
left or right by the split (for competitor splits this is the number
that would have been sent left or right had this split been used, for
surrogate splits it is the number missing the primary split variable
which were decided using this surrogate), ncat, the number of
categories or levels for the variable (+/-1 for a continuous
variable), improve, which is the improvement in deviance given
by this split, or, for surrogates, the concordance of the surrogate
with the primary, and index, the numeric split point. The last
column adj gives the adjusted concordance for surrogate splits.
For a factor, the index column contains the row number of the
csplit matrix. For a continuous variable, the sign of ncat
determines whether the subset x < cutpoint or x >
cutpoint is sent to the left.index column
of the splits matrix. The columns record 1 if that
level of the factor goes to the left, 3 if it goes to the
right, and 2 if that level is not present at this node
of the tree (or not defined for the factor)."class", "exp", "poisson", "anova" or
"user" (if splitting functions were supplied).summary.rpart these are rescaled to add to 100.summary, print and text functions for method used.model.frame on
the special handling of NAs derived from the na.action
argument."xlevels" and "levels"
recording the levels of any factor splitting variables and of a factor
response respectively.Optional components include the model frame (model), the matrix
of predictors (x) and the response variable (y) used to
construct the rpart object.
rpart
object.rpart.