This function is a generic to count the number of occurences of predictors in either a "semtree" or a "semforest". Note that this must not be confused with the importance of those predictors. To estimate importance, rather use permutation-based variable importance with varimp.

countPredictors(x, ...)

# S3 method for class 'semtree'
countPredictors(x, ...)

# S3 method for class 'semforest'
countPredictors(x, ...)

Arguments

x

An object representing either a SEM tree or a forest.

...

Additional arguments passed to methods.

Value

A result depending on the method.