Learn R Programming

semTools

Useful tools for structural equation modeling.

This is an R package whose primary purpose is to extend the functionality of the R package lavaan. There are several suites of tools in the package, which correspond to the same theme. To browse these suites, open the help page at the Console:

?semTools::`semTools-package`

Additional tools are available to do not require users to rely on any R packages for SEM (e.g., lavaan, OpenMx, or sem), as long as their other software provides the information they need. Examples:

  • monteCarloMed() to calculate Monte Carlo confidence intervals for functions of parameters, such as indirect effects in mediation models
  • calculate.D2() to pool z or chi-squared statistics across multiple imputations of missing data
  • indProd() for creating product indicators of latent interactions
  • SSpower() provides analytically derived power estimates for SEMs
  • tukeySEM() for Tukey's WSD post-hoc test of mean-differences under unequal variance and sample size
  • bsBootMiss() to transform incomplete data to be consistent with the null-hypothesized model, appropriate for model-based (a.k.a. "Bollen--Stine") boostrapping

All users of R (or SEM) are invited to submit functions or ideas for functions by contacting the maintainer, Terrence Jorgensen (TJorgensen314 at gmail dot com). Contributors are encouraged to use Roxygen comments to document their contributed code, which is consistent with the rest of semTools. Read the vignette from the roxygen2 package for details:

vignette("rd", package = "roxygen2")

Copy Link

Version

Install

install.packages('semTools')

Monthly Downloads

16,792

Version

0.5-8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Terry Jorgensen

Last Published

February 14th, 2026

Functions in semTools (0.5-8)

dat3way

Simulated Dataset to Demonstrate Three-way Latent Interaction
efa.ekc

Empirical Kaiser criterion
epcEquivCheck

EPC Equivalence Feasibility Check for Standardized Parameters
discriminantValidity

Calculate discriminant validity statistics
combinequark

Combine the results from the quark function
compareFit

Build an object summarizing fit indices across multiple models
dat2way

Simulated Dataset to Demonstrate Two-way Latent Interaction
epcEquivFit

EPC Equivalence Fit Evaluation Using Modification Indices
compRelSEM

Composite Reliability using SEM
datCat

Simulated Data set to Demonstrate Categorical Measurement Invariance
findRMSEApower

Find the statistical power based on population RMSEA
fmi

Fraction of Missing Information.
findRMSEApowernested

Find power given a sample size in nested model comparison
imposeStart

Specify starting values from a lavaan output
exLong

Simulated Data set to Demonstrate Longitudinal Measurement Invariance
htmt

Assessing Discriminant Validity using Heterotrait--Monotrait Ratio
findRMSEAsamplesizenested

Find sample size given a power in nested model comparison
goricaSEM

Wrapper for goric.lavaan() from the restriktor package
findRMSEAsamplesize

Find the minimum sample size for a given statistical power based on population RMSEA
indProd

Make products of indicators using no centering, mean centering, double-mean centering, or residual centering
measEq.syntax-class

Class for Representing a Measurement-Equivalence Model
kurtosis

Finding excessive kurtosis
lrv2ord

Calculate Population Moments for Ordinal Data Treated as Numeric
loadingFromAlpha

Find standardized factor loading from coefficient alpha
mardiaKurtosis

Finding Mardia's multivariate kurtosis
maximalRelia

Calculate maximal reliability
kd

Generate data via the Kaiser-Dickman (1962) algorithm.
lavaan2emmeans

emmeans Support Functions for lavaan Models
measEq.syntax

Syntax for measurement equivalence
mardiaSkew

Finding Mardia's multivariate skewness
plausibleValues

Plausible-Values Imputation of Factor Scores Estimated from a lavaan Model
monteCarloCI

Monte Carlo Confidence Intervals to Test Functions of Parameter Estimates
net

Nesting and Equivalence Testing
partialInvariance

Partial Measurement Invariance Testing Across Groups
parcelAllocation

Random Allocation of Items to Parcels in a Structural Equation Model
mvrnonnorm

Generate Non-normal Data using Vale and Maurelli (1983) method
moreFitIndices

Calculate more fit indices
nullRMSEA

Calculate the RMSEA of the null model
permuteMeasEq

Permutation Randomization Tests of Measurement Equivalence and Differential Item Functioning (DIF)
permuteMeasEq-class

Class for the Results of Permutation Randomization Tests of Measurement Equivalence and DIF
plotRMSEApowernested

Plot power of nested model RMSEA
plotRMSEApower

Plot power curves for RMSEA
probe2WayMC

Probing two-way interaction on the no-centered or mean-centered latent interaction
plotProbe

Plot a latent interaction
probe3WayMC

Probing three-way interaction on the no-centered or mean-centered latent interaction
quark

Quark
plotRMSEAdist

Plot the sampling distributions of RMSEA
probe3WayRC

Probing three-way interaction on the residual-centered latent interaction
probe2WayRC

Probing two-way interaction on the residual-centered latent interaction
poolMAlloc

Combine sampling variability with parcel-allocation variability by pooling results across M parcel-allocations
skew

Finding skewness
residualCovariate

Residual-center all target indicators by covariates
semTools

semTools: Useful Tools for Structural Equation Modeling
semTools-deprecated

Deprecated functions in package semTools.
splitSample

Randomly Split a Data Set into Halves
singleParamTest

Single Parameter Test Divided from Nested Model Comparison
reliabilityL2-deprecated

Calculate the reliability values of a second-order factor
reliability-deprecated

Composite Reliability using SEM
simParcel

Simulated Data set to Demonstrate Random Allocations of Parcels
twostage

Fit a lavaan model using 2-Stage Maximum Likelihood (TSML) estimation for missing data.
twostage-class

Class for the Results of 2-Stage Maximum Likelihood (TSML) Estimation for Missing Data
tukeySEM

Tukey's WSD post-hoc test of means for unequal variance and sample size
auxiliary

Implement Saturated Correlates with FIML
chisqSmallN

Small-N correction for \(chi^2\) test statistic
clipboard

Copy or save the result of lavaan or FitDiff objects into a clipboard or a file
Net-class

Class For the Result of Nesting and Equivalence Testing
PAVranking

Parcel-Allocation Variability in Model Ranking
bsBootMiss

Bollen-Stine Bootstrap with the Existence of Missing Data
BootMiss-class

Class For the Results of Bollen-Stine Bootstrap with Incomplete Data
AVE

Calculate average variance extracted
FitDiff-class

Class For Representing A Template of Model Fit Comparisons
SSpower

Power for model parameters