If no argument is provided for the parameter node, summaries are printed for every terminal node. Otherwise, the summary of just the requested node is printed.

terminalNodeSummary(tree, node = NULL)

Arguments

tree

A model returned by splineTree().

node

The number of the node that you want summarized. To see which nodes correspond to which numbers, see stPrint(tree) or treeSummary(tree). If this parameter is provided, must correspond to a valid terminal node in the tree.

Examples

split_formula <- ~HISP + WHITE + BLACK + SEX + Num_sibs + HGC_FATHER + HGC_MOTHER tree <- splineTree(split_formula, BMI~AGE, idvar = "ID", data = nlsySample, degree = 1, df = 3, intercept = TRUE, cp = 0.005)
terminalNodeSummary(tree)
#> #> node number: 4 #> root #> WHITE< 0.5 #> HGC_FATHER< 0.5 #> #> N: 25 #> Coefficients: 23.0892781669265,7.70328941507821,8.38070614243937 #> ---------- #> #> node number: 5 #> root #> WHITE< 0.5 #> HGC_FATHER>=0.5 #> #> N: 480 #> Coefficients: 21.3362159466182,5.7879903529505,9.03876717557183 #> ---------- #> #> node number: 6 #> root #> WHITE>=0.5 #> SEX< 1.5 #> #> N: 259 #> Coefficients: 22.6936000133576,3.99950986759995,6.89689702760744 #> ---------- #> #> node number: 14 #> root #> WHITE>=0.5 #> SEX>=1.5 #> HGC_FATHER< 7.5 #> #> N: 12 #> Coefficients: 20.4004082289206,9.02757082718176,9.90302922358699 #> ---------- #> #> node number: 15 #> root #> WHITE>=0.5 #> SEX>=1.5 #> HGC_FATHER>=7.5 #> #> N: 224 #> Coefficients: 20.4602494008039,3.78024341772909,7.31245053282688 #> ----------