Package: semtree 0.10.0

Andreas M. Brandmaier

semtree: Recursive Partitioning for Structural Equation Models

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) <doi:10.1037/a0030001> and Arnold, Voelkle, & Brandmaier (2020) <doi:10.3389/fpsyg.2020.564403>.

Authors:Andreas M. Brandmaier [aut, cre], John J. Prindle [aut], Manuel Arnold [aut], Caspar J. Van Lissa [aut], Moritz John [ctb]

semtree_0.10.0.tar.gz
semtree_0.10.0.zip(r-4.7)semtree_0.10.0.zip(r-4.6)semtree_0.10.0.zip(r-4.5)
semtree_0.10.0.tgz(r-4.6-any)semtree_0.10.0.tgz(r-4.5-any)
semtree_0.10.0.tar.gz(r-4.7-any)semtree_0.10.0.tar.gz(r-4.6-any)
semtree_0.10.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
semtree/json (API)
NEWS

# Install 'semtree' in R:
install.packages('semtree', repos = c('https://lifebrain.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/brandmaier/semtree/issues

Datasets:
  • lgcm - Simulated Linear Latent Growth Curve Data

On CRAN:

Conda:

bigdatadecision-treeforestmultivariaterandomforestrecursive-partitioningsemstatistical-modelingstructural-equation-modelingstructural-equation-models

8.86 score 21 stars 117 scripts 503 downloads 43 exports 63 dependencies

Last updated from:7102fce4dd. Checks:7 WARNING, 2 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING216
source / vignettesOK592
linux-release-x86_64WARNING231
macos-release-arm64WARNING189
macos-oldrel-arm64WARNING165
windows-develWARNING189
windows-releaseWARNING180
windows-oldrelWARNING174
wasm-releaseOK142

Exports:aggregateVarimpbiodiversityborutacountPredictorsdiversityMatrixevaluateTreefitSubmodelsgetDepthgetLeafsgetNodeByIdgetParDiffForestgetParDiffTreegetTerminalNodeshellingerisLeafklmodelEstimatesoutliersparameterspartialDependencepartialDependence_datapartialDependence_growthplotParDiffForestplotParDiffTreeplotTreeStructureproximityprunesesemforestsemforest_controlsemforest_score_controlsemforest.controlsemtreesemtree_controlsemtree.constraintssemtree.controlstripsubforestsubtreethinOuttoTablevarimpvarimpConvergencePlot

Dependencies:BHcliclisymbolsclustercodetoolscpp11crayondata.tabledigestdplyrexpmfarverfuturefuture.applygenericsggplot2globalsgluegridBasegtableisobandlabelinglatticelavaanlifecyclelistenvmagrittrMASSMatrixmnormtmvtnormnumDerivOpenMxparallellypbivnormpillarpkgconfigpurrrquadprogR6RColorBrewerRcppRcppEigenRcppParallelrlangrpartrpart.plotrpfS7sandwichscalesStanHeadersstringistringrstrucchangetibbletidyrtidyselectutf8vctrsviridisLitewithrzoo

Constraints in semtree

Rendered fromconstraints.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2025-12-05
Started: 2019-09-17

Focus parameters in SEM forests

Rendered fromsemforest-focus.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2025-12-05
Started: 2020-04-23

Getting Started with the semtree package

Rendered fromgetting-started.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2025-12-05
Started: 2019-09-12

Multiple-Testing Corrections: Personality Structure in the spi Dataset

Rendered fromspi-semtree.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2025-12-05
Started: 2025-11-25

Parallel SEM Forests with the future Package

Rendered fromfuture-parallel-semforest.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2025-11-26
Started: 2025-11-26

SEM Forests

Rendered fromforests.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2026-01-20
Started: 2020-11-05

SEM Trees with score-based tests

Rendered fromscore-based-tests.Rmdusingknitr::rmarkdownon May 25 2026.

Last update: 2025-12-05
Started: 2020-04-17

Readme and manuals

Help Manual

Help pageTopics
SEM Tree Packagesemtree-package .SCALE_METRIC
Aggregate Variable Importance EstimatesaggregateVarimp
Quantify bio diversity of a SEM Forestbiodiversity
Run the Boruta algorithm on a sem treeboruta plot.boruta print.boruta
Return the parameter estimates of a given leaf of a SEM treecoef.semtree
Wrapper function for computing the maxLR corrected p value from strucchangecomputePval_maxLR
Count predictorscountPredictors countPredictors.semforest countPredictors.semtree
Diversity MatrixdiversityMatrix
Average Deviance of a Dataset given a Forestevaluate evaluate.semforest
Compute the Negative Two-Loglikelihood of some data given a model (either OpenMx or lavaan)evaluateDataLikelihood
Evaluate Tree -2LLevaluateTree
Find Other Node Split ValuesfindOtherSplits
Fit multigroup model for evaluating a candidate split. This function has the fundamental logic for fitting two-group models in different variantsfitSubmodels
Get the depth (or, height) a tree.getDepth
Determine Height of a TreegetHeight
Get a list of all leafs in a treegetLeafs
Get Node By IdgetNodeById
Tree SizegetNumNodes
Return list with parameter differences of a forestgetParDiffForest
Return table with parameter differences of a treegetParDiffTree
Returns all leafs of a treegetTerminalNodes
Test whether a semtree object is a leaf.isLeaf
Distanceshellinger kl klsym
Simulated Linear Latent Growth Curve Datalgcm
Merge two SEM forestsmerge.semforest
Returns all estimates of a treemodelEstimates
Find outliers based on case proximityoutliers
SEMtrees Parameter Estimates Tableparameters
Compute partial dependencepartialDependence
Create dataset to compute partial dependencepartialDependence_data
Compute partial dependence for latent growth modelspartialDependence_growth
Plot parameter differencesplotParDiffForest
Plot parameter differencesplotParDiffTree
Plot tree structureplotTreeStructure
Predict method for semtree and semforestpredict.semforest
Compute proximity matrixproximity
Prune a SEM Tree or SEM Forestprune prune.semforest prune.semtree
SEMtrees Parameter Estimates Standard Error Tablese
Create a SEM Forestplot.semforest print.semforest semforest
SEM Forest Control Objectprint.semforest.control semforest.control semforest_control semforest_score_control
SEM Tree: Recursive Partitioning for Structural Equation ModelsnodeFunSemtree plot.semtree print.semtree semtree summary.semtree toLatex.semtree
SEM Tree Control Objectprint.semtree.control semtree.control semtree_control
SEM Tree Constraints Objectsemtree.constraints
Retain only basic tree structurestrip
Creates subsets of trees from forestssubforest
SEMtree Partitioning Toolsubtree
Thin Out a ForestthinOut
Tabular Representation of a SEM TreetoTable
SEM Forest Variable Importanceplot.semforest.varimp print.semforest.varimp varimp varimpConvergencePlot