Learn R Programming

⚠️There's a newer version (0.5-6) of this package.Take me there.

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

14,750

Version

0.5-2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

August 30th, 2019

Functions in semTools (0.5-2)

EFA-class

Class For Rotated Results from EFA
SSpower

Power for model parameters
FitDiff-class

Class For Representing A Template of Model Fit Comparisons
chisqSmallN

k-factor correction for \(chi^2\) test statistic
BootMiss-class

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

Class For the Result of Nesting and Equivalence Testing
calculate.D2

Calculate the "D2" statistic
auxiliary

Implement Saturated Correlates with FIML
PAVranking

Parcel-Allocation Variability in Model Ranking
bsBootMiss

Bollen-Stine Bootstrap with the Existence of Missing Data
exLong

Simulated Data set to Demonstrate Longitudinal Measurement Invariance
efaUnrotate

Analyze Unrotated Exploratory Factor Analysis Model
imposeStart

Specify starting values from a lavaan output
efa.ekc

Empirical Kaiser criterion
htmt

Assessing Discriminant Validity using Heterotrait-Monotrait Ratio
clipboard

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

Finding excessive kurtosis
lavTestLRT.mi

Likelihood Ratio Test for Multiple Imputations
datCat

Simulated Data set to Demonstrate Categorical Measurement Invariance
combinequark

Combine the results from the quark function
dat3way

Simulated Dataset to Demonstrate Three-way Latent Interaction
compareFit

Build an object summarizing fit indices across multiple models
findRMSEAsamplesizenested

Find sample size given a power in nested model comparison
fmi

Fraction of Missing Information.
dat2way

Simulated Dataset to Demonstrate Two-way Latent Interaction
findRMSEApower

Find the statistical power based on population RMSEA
findRMSEAsamplesize

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

Find power given a sample size in nested model comparison
loadingFromAlpha

Find standardized factor loading from coefficient alpha
lavaan.mi-class

Class for a lavaan Model Fitted to Multiple Imputations
maximalRelia

Calculate maximal reliability
mardiaSkew

Finding Mardia's multivariate skewness
mvrnonnorm

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

Calculate the RMSEA of the null model
lavTestScore.mi

Score Test for Multiple Imputations
indProd

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

Measurement Invariance Tests
kd

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

Wald Test for Multiple Imputations
net

Nesting and Equivalence Testing
miPowerFit

Modification indices and their power approach for model fit evaluation
longInvariance-deprecated

Measurement Invariance Tests Within Person
modindices.mi

Modification Indices for Multiple Imputations
monteCarloMed

Monte Carlo Confidence Intervals to Test Complex Indirect Effects
mardiaKurtosis

Finding Mardia's multivariate kurtosis
moreFitIndices

Calculate more fit indices
measEq.syntax

Syntax for measurement equivalence
measEq.syntax-class

Class for Representing a Measurement-Equivalence Model
plotRMSEApower

Plot power curves for RMSEA
plotRMSEApowernested

Plot power of nested model RMSEA
partialInvariance

Partial Measurement Invariance Testing Across Groups
permuteMeasEq-class

Class for the Results of Permutation Randomization Tests of Measurement Equivalence and DIF
measurementInvarianceCat-deprecated

Measurement Invariance Tests for Categorical Items
plotProbe

Plot a latent interaction
plotRMSEAdist

Plot the sampling distributions of RMSEA
plausibleValues

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

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

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

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

Single Parameter Test Divided from Nested Model Comparison
skew

Finding skewness
orthRotate

Implement orthogonal or oblique rotation
twostage

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

Residual-center all target indicators by covariates
twostage-class

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

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

Calculate reliability values of factors
probe2WayMC

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

Random Allocation of Items to Parcels in a Structural Equation Model
semTools-deprecated

Deprecated functions in package semTools.
runMI

Fit a lavaan Model to Multiple Imputed Data Sets
probe3WayRC

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

Randomly Split a Data Set into Halves
tukeySEM

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

Quark
reliabilityL2

Calculate the reliability values of a second-order factor
semTools

semTools: Useful Tools for Structural Equation Modeling
simParcel

Simulated Data set to Demonstrate Random Allocations of Parcels