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

21,176

Version

0.5-9

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Terry Jorgensen

Last Published

July 13th, 2026

Functions in semTools (0.5-9)

dat3way

Simulated Dataset to Demonstrate Three-way Latent Interaction
combinequark

Combine the results from the quark function
compareFit

Build an object summarizing fit indices across multiple models
discriminantValidity

Calculate discriminant validity statistics
efa.ekc

Empirical Kaiser criterion
compRelSEM

Composite Reliability using SEM
epcEquivFit

EPC Equivalence Fit Evaluation Using Modification Indices
epcEquivCheck

EPC Equivalence Compensatory-Effect Check for Standardized Parameters
datCat

Simulated Data set to Demonstrate Categorical Measurement Invariance
dat2way

Simulated Dataset to Demonstrate Two-way Latent Interaction
findRMSEAsamplesize

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

Specify starting values from a lavaan output
findRMSEAsamplesizenested

Find sample size given a power in nested model comparison
findRMSEApowernested

Find power given a sample size in nested model comparison
exLong

Simulated Data set to Demonstrate Longitudinal Measurement Invariance
indProd

Make products of indicators using no centering, mean centering, double-mean centering, or residual centering
goricaSEM

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

Assessing Discriminant Validity using Heterotrait--Monotrait Ratio
findRMSEApower

Find the statistical power based on population RMSEA
fmi

Fraction of Missing Information.
mardiaSkew

Finding Mardia's multivariate skewness
maximalRelia

Calculate maximal reliability
kd

Generate data via the Kaiser-Dickman (1962) algorithm.
measEq.syntax-class

Class for Representing a Measurement-Equivalence Model
loadingFromAlpha

Find standardized factor loading from coefficient alpha
lrv2ord

Calculate Population Moments for Ordinal Data Treated as Numeric
kurtosis

Finding excessive kurtosis
measEq.syntax

Syntax for measurement equivalence
mardiaKurtosis

Finding Mardia's multivariate kurtosis
lavaan2emmeans

emmeans Support Functions for lavaan Models
permuteMeasEq-class

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

Nesting and Equivalence Testing
monteCarloCI

Monte Carlo Confidence Intervals to Test Functions of Parameter Estimates
parcelAllocation

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

Calculate more fit indices
nullRMSEA

Calculate the RMSEA of the null model
mvrnonnorm

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

Partial Measurement Invariance Testing Across Groups
permuteMeasEq

Permutation Randomization Tests of Measurement Equivalence and Differential Item Functioning (DIF)
plausibleValues

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

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

Plot power of nested model RMSEA
quark

Quark
probe2WayMC

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

Plot power curves for RMSEA
plotRMSEAdist

Plot the sampling distributions of RMSEA
plotProbe

Plot a latent interaction
probe3WayRC

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

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

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

Simulated Data set to Demonstrate Random Allocations of Parcels
semTools

semTools: Useful Tools for Structural Equation Modeling
residualCovariate

Residual-center all target indicators by covariates
singleParamTest

Single Parameter Test Divided from Nested Model Comparison
splitSample

Randomly Split a Data Set into Halves
tukeySEM

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

Finding skewness
semTools-deprecated

Deprecated functions in package semTools.
reliability-deprecated

Composite Reliability using SEM
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
reliabilityL2-deprecated

Calculate the reliability values of a second-order factor
BootMiss-class

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

Class For Representing A Template of Model Fit Comparisons
clipboard

Copy or save the result of lavaan or FitDiff objects into a clipboard or a file
PAVranking

Parcel-Allocation Variability in Model Ranking
chisqSmallN

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

Implement Saturated Correlates with FIML
Net-class

Class For the Result of Nesting and Equivalence Testing
AVE

Calculate average variance extracted
SSpower

Power for model parameters
bsBootMiss

Bollen-Stine Bootstrap with the Existence of Missing Data