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

15,307

Version

0.5-6

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

May 10th, 2022

Functions in semTools (0.5-6)

Net-class

Class For the Result of Nesting and Equivalence Testing
SSpower

Power for model parameters
EFA-class

Class For Rotated Results from EFA
bsBootMiss

Bollen-Stine Bootstrap with the Existence of Missing Data
calculate.D2

Calculate the "D2" statistic
datCat

Simulated Data set to Demonstrate Categorical Measurement Invariance
findRMSEAsamplesizenested

Find sample size given a power in nested model comparison
findRMSEAsamplesize

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

Simulated Dataset to Demonstrate Three-way Latent Interaction
discriminantValidity

Calculate discriminant validity statistics
indProd

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

Specify starting values from a lavaan output
efa.ekc

Empirical Kaiser criterion
compareFit

Build an object summarizing fit indices across multiple models
PAVranking

Parcel-Allocation Variability in Model Ranking
auxiliary

Implement Saturated Correlates with FIML
dat2way

Simulated Dataset to Demonstrate Two-way Latent Interaction
AVE

Calculate average variance extracted
combinequark

Combine the results from the quark function
FitDiff-class

Class For Representing A Template of Model Fit Comparisons
kd

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

Finding excessive kurtosis
measEq.syntax

Syntax for measurement equivalence
measurementInvariance-deprecated

Measurement Invariance Tests
lavTestScore.mi

Score Test for Multiple Imputations
efaUnrotate

Analyze Unrotated Exploratory Factor Analysis Model
lavTestLRT.mi

Likelihood Ratio Test for Multiple Imputations
mardiaKurtosis

Finding Mardia's multivariate kurtosis
exLong

Simulated Data set to Demonstrate Longitudinal Measurement Invariance
fmi

Fraction of Missing Information.
lavTestWald.mi

Wald Test for Multiple Imputations
mardiaSkew

Finding Mardia's multivariate skewness
compRelSEM

Composite Reliability using SEM
permuteMeasEq-class

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

Assessing Discriminant Validity using Heterotrait--Monotrait Ratio
findRMSEApower

Find the statistical power based on population RMSEA
chisqSmallN

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

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

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

Permutation Randomization Tests of Measurement Equivalence and Differential Item Functioning (DIF)
lavaan.mi-class

Class for a lavaan Model Fitted to Multiple Imputations
semTools-deprecated

Deprecated functions in package semTools.
findRMSEApowernested

Find power given a sample size in nested model comparison
modindices.mi

Modification Indices for Multiple Imputations
semTools

semTools: Useful Tools for Structural Equation Modeling
parcelAllocation

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

Monte Carlo Confidence Intervals to Test Functions of Parameter Estimates
plausibleValues

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

emmeans Support Functions for lavaan Models
loadingFromAlpha

Find standardized factor loading from coefficient alpha
plotProbe

Plot a latent interaction
quark

Quark
longInvariance-deprecated

Measurement Invariance Tests Within Person
lrv2ord

Calculate Population Moments for Ordinal Data Treated as Numeric
tukeySEM

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

Calculate maximal reliability
net

Nesting and Equivalence Testing
measEq.syntax-class

Class for Representing a Measurement-Equivalence Model
nullRMSEA

Calculate the RMSEA of the null model
orthRotate

Implement orthogonal or oblique rotation
reliability-deprecated

Composite Reliability using SEM
runMI

Fit a lavaan Model to Multiple Imputed Data Sets
plotRMSEApowernested

Plot power of nested model RMSEA
measurementInvarianceCat-deprecated

Measurement Invariance Tests for Categorical Items
poolMAlloc

Pooled estimates and standard errors across M parcel-allocations: Combining sampling variability and parcel-allocation variability.
simParcel

Simulated Data set to Demonstrate Random Allocations of Parcels
singleParamTest

Single Parameter Test Divided from Nested Model Comparison
twostage-class

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

Modification indices and their power approach for model fit evaluation
moreFitIndices

Calculate more fit indices
mvrnonnorm

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

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

Partial Measurement Invariance Testing Across Groups
reliabilityL2-deprecated

Calculate the reliability values of a second-order factor
residualCovariate

Residual-center all target indicators by covariates
probe2WayRC

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

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

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

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

Randomly Split a Data Set into Halves
plotRMSEAdist

Plot the sampling distributions of RMSEA
plotRMSEApower

Plot power curves for RMSEA
skew

Finding skewness