Returns a new tree with a maximum depth selected by the user. can be used in conjunction with plot commands to view various pruning levels.

prune(object, ...)

Arguments

object

A semtree or semforest object.

...

Optional parameters, such as max.depth the maximum depth of each tree, or also num.trees when pruning a forest.

Value

Returns a semtree object.

Details

The returned tree is only modified by the number of levels for the tree. This function does not reevaluate the data, but provides alternatives to reduce tree complexity. If the user would like to alter the tree by increasing depth, then max.depth option must be adjusted in the semtree.control object (provided further splits are able to be computed).

References

Brandmaier, A.M., Oertzen, T. v., McArdle, J.J., & Lindenberger, U. (2013). Structural equation model trees. Psychological Methods, 18(1), 71-86.

Author

Andreas M. Brandmaier, John J. Prindle