nodesum {conTree}R Documentation

Summarize contrast tree

Description

Summarize contrast tree

Show graphical terminal node summaries

Usage

nodesum(tree, x, y, z, w = rep(1, nrow(x)), doplot = FALSE)

nodeplots(
  tree,
  x,
  y,
  z,
  w = rep(1, nrow(x)),
  nodes = NULL,
  xlim = NULL,
  ylim = NULL,
  pts = "FALSE",
  span = 0.15
)

Arguments

tree

model object output from contrast() or prune()

x

training input predictor data matrix or data frame in same format as in contrast()

y

vector, or matrix containing training data input outcome values or censoring intervals for each observation in same format as in contrast()

z

vector containing values of a second contrasting quantity for each observation in same observation format as in contrast()

w

observation weights

doplot

a flag to display/not display plots of output quantities

nodes

selected tree terminal node identifiers. Default is all terminal nodes

xlim

x-axis limit

ylim

y-axis limit

pts

logical flag indicating whether to show y-values as circles/points (type = 'pp' only)

span

running median smoother span (type = 'diff' only)

Details

The graphical representations of terminal node contrasts depend on the tree type graphical representations of terminal node contrasts depending on tree type -type = 'dist' implies CDFs of y and z in each terminal node. (Only top nine nodes are shown). Note that y can be censored (see above) -type = 'diff' implies plot y versus z in each terminal node. (Only top nine nodes are shown). -type = 'class' implies barplot of misclassification risk (upper) amd total weight (lower) in each terminal node -type = 'prob' implies upper barplot contrasting empirical (blue) and predicted (red) p(y=1) in each terminal node. Lower barplot showing total weight in each terminal node.

Value

a named list of four items:

See Also

contrast()


[Package conTree version 0.3-1 Index]