Misclassification Errors for a Classification Tree

DESCRIPTION:
Returns the number of misclassification errors for a classification tree.

USAGE:
misclass.tree(tree, detail=F)

REQUIRED ARGUMENTS:
tree:
fitted model object of class tree. This is assumed to be the result of some function that produces such object.

OPTIONAL ARGUMENTS:
detail:
logical flag. If TRUE, returns the number of misclassification errors at each node; if FALSE (default), returns the overall number of misclassification errors.

VALUE:
The number of misclassification errors at each node of tree, or the total number of misclassification errors.

SEE ALSO:
tree .

EXAMPLES:
 z.survey <- tree(market.survey, na.action = na.omit)
 misclass.tree(z.survey)/length(pick)  # misclassification error rate