treeSize function

Returns number of terminal nodes in a tree.

Returns number of terminal nodes in a tree.

treeSize(model)

Arguments

  • model: A model returned by splineTree(). Also works on any rpart object

Returns

The number of terminal nodes in the tree

Examples

## Not run: split_formula <- ~ HISP + WHITE + BLACK + SEX + HGC_FATHER + HGC_MOTHER + Num_sibs tree <- splineTree(split_formula, BMI~AGE, 'ID', nlsySample, degree=1, df=3, intercept=TRUE, cp=0.006, minNodeSize=20) ## End(Not run) treeSize(tree)
  • Maintainer: Anna Neufeld
  • License: MIT + file LICENSE
  • Last published: 2019-07-18