see @return for details. Note that package partykit is loaded, but not
attached, in this function.
Usage
ctree2splitInfo(cRe, pCut, nodeInds = partykit::nodeids(cRe, terminal = F))Arguments
- cRe
object returned from
partykit::ctree()- pCut
numeric; p-val cutoff to be significant
- nodeInds
int vectors, e.g.
1:5for a tree of five nodes, including leaves
Value
return a list of following items:
pValsis a list of significant variables at each node ofnodeIndsexcluding leaves;length(pVals): number of internal nodesnames(pVals): the name of splitting variable at each nodeeach item of
pValsis a numeric vector of p-vals for all variables whosep-val <= pCut, ordered by increasing p-vals
spVars.dfa data.frame of following four columns, one node per row,variable: the name of splitting variable (spVar)pVal: the p-val of thespVarsCut: the splitting pointgtOnRight: T/F; are observations of greater (gt: greater than) values on the right branch of the node? The separation of numeric spVar is always<=and>; if the leaves are listed in increasingy,gtOnRight==Tmeans thespVarhas positive association withy.
spVars.str, a string combining all rows ofspVars.df. rows are separated by ';' and cells are by ','
if cRe has only one root node, i.e. no splitting, NULL is returned