Learn R Programming

semtree (version 0.9.22)

Recursive Partitioning for Structural Equation Models

Description

SEM Trees and SEM Forests -- an extension of model-based decision trees and forests to Structural Equation Models (SEM). SEM trees hierarchically split empirical data into homogeneous groups each sharing similar data patterns with respect to a SEM by recursively selecting optimal predictors of these differences. SEM forests are an extension of SEM trees. They are ensembles of SEM trees each built on a random sample of the original data. By aggregating over a forest, we obtain measures of variable importance that are more robust than measures from single trees. A description of the method was published by Brandmaier, von Oertzen, McArdle, & Lindenberger (2013) and Arnold, Voelkle, & Brandmaier (2020) .

Copy Link

Version

Install

install.packages('semtree')

Monthly Downloads

582

Version

0.9.22

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Andreas M. Brandmaier andy@brandmaier.de

Last Published

July 28th, 2025

Functions in semtree (0.9.22)

getParDiffTree

Return table with parameter differences of a tree
getHeight

Determine Height of a Tree
getTerminalNodes

Returns all leafs of a tree
getParDiffForest

Return list with parameter differences of a forest
getNodeById

Get Node By Id
lgcm

Simulated Linear Latent Growth Curve Data
parameters

SEMtrees Parameter Estimates Table
outliers

Find outliers based on case proximity
prune

Prune a SEM Tree or SEM Forest
kl

Distances
modelEstimates

Returns all estimates of a tree
proximity

Compute proximity matrix
subforest

Creates subsets of trees from forests
plotParDiffForest

Plot parameter differences
plotParDiffTree

Plot parameter differences
toTable

Tabular Representation of a SEM Tree
varimp

SEM Forest Variable Importance
partialDependence

Compute partial dependence
se

SEMtrees Parameter Estimates Standard Error Table
subtree

SEMtree Partitioning Tool
semforest

Create a SEM Forest
semforest.control

SEM Forest Control Object
predict.semforest

Predict method for semtree and semforest
merge.semforest

Merge two SEM forests
plotTreeStructure

Plot tree structure
semtree.control

SEM Tree Control Object
semtree-package

SEM Tree Package
strip

Retain only basic tree structure
partialDependence_growth

Compute partial dependence for latent growth models
semtree.constraints

SEM Tree Constraints Object
partialDependence_data

Create dataset to compute partial dependence
semtree

SEM Tree: Recursive Partitioning for Structural Equation Models
diversityMatrix

Diversity Matrix
findOtherSplits

Find Other Node Split Values
fitSubmodels

Fit multigroup model for evaluating a candidate split
evaluate

Average Deviance of a Dataset given a Forest
evaluateDataLikelihood

Compute the Negative Two-Loglikelihood of some data given a model (either OpenMx or lavaan)
coef.semtree

Return the parameter estimates of a given leaf of a SEM tree
computePval_maxLR

Wrapper function for computing the maxLR corrected p value from strucchange
boruta

Run the Boruta algorithm on a sem tree
evaluateTree

Evaluate Tree -2LL
biodiversity

Quantify bio diversity of a SEM Forest
getNumNodes

Tree Size
getDepth

Get the depth (or, height) a tree.
getLeafs

Get a list of all leafs in a tree
isLeaf

Test whether a semtree object is a leaf.