A helper function to evaluate the negative two log-likelihood (-2LL) of leaf (terminal) nodes for a
dataset. When given a semtree
and a unique dataset, the model
estimates -2LL for the tree parameters and data subsets that fit the tree
branching criteria.
evaluateTree(tree, test_set, data_type = "raw", leaf_ids = NULL)
A list with two elements:
Combined -2LL for leaf node models of the tree.
Number of leaf nodes used for the deviance calculations.
Brandmaier, A.M., Oertzen, T. v., McArdle, J.J., & Lindenberger, U. (2013). Structural equation model trees. Psychological Methods, 18(1), 71-86.