Skip to content
Terrence edited this page Mar 13, 2025 · 36 revisions

List of all current functionality

Output Handling

  • clipboard(): Copy the output of methods (e.g., summary()) for lavaan objects into the clipboard, which can be pasted in other programs such as Excel
  • saveFile(): Save the attributes of the lavaan object into a file
  • compareFit(): Compare fit measures across multiple nested or nonnested lavaan outputs

Diagnose and Generate Non-Normal Data

  • skew() and kurtosis(): Univariate skewness and excessive kurtosis
  • mardiaSkew() and mardiaKurtosis(): Mardia's multivariate skewness and kurtosis
  • mvrnonnorm(): Convenience function to generate nonnormal data using Vale and Maurelli (1983) method

Model Fit Evaluation

  • chisqSmallN(): chi-squared test statistic (or difference) adjusted for small sample size
  • moreFitIndices() and nullRMSEA(): Calculate more fit indices from lavaan objects: Gamma Hat (GFI*), Adjusted Gamma Hat (AGFI*), Corrected Akaike Information Criterion (AICc), Stochastic Information Criterion (SIC), Corrected Bayesian Information Criterion (BIC*), Hannan-Quinn Information Criterion (HQC), and the RMSEA of the null model
  • miPowerFit(): Model evaluation method provided by Satorra, Saris, & van der Weld (2009) that uses modification indices and the power of modification indices
  • singleParamTest(): Test each constraint that defines the differences between nested models

Measurement Equivalence/Invariance

  • measEq.syntax(): Automates writing lavaan model syntax for various levels of measurement equivalence/invariance, across independent groups as well as dependent/repeated measurements (e.g., longitudinal or dyadic factor models)
  • partialInvariance() and partialInvarianceCat(): A range of partial invariance tests across multiple groups for continuous and categorical indicators, respectively
  • permuteMeasEq(): Find the null hypothesis distribution of fit indices in measurement invariance across groups using the permutation method

Power Analysis

  • SSpower(): Power analysis for each parameter using Satorra and Bentler's (1985) method
  • findRMSEApower(): Find the power of rejecting bad models or retaining good models using RMSEA given sample size (MacCallum, Browne, & Suguwara, 1996)
  • plotRMSEApower(): Plot the power of rejecting bad models or retaining good models using RMSEA given a range of sample size
  • plotRMSEAdist(): Visualize the sampling distribution of RMSEA
  • findRMSEAsamplesize(): Find the minimum sample size given the desired power using RMSEA

Power Analysis for Nested Model Comparison

  • findRMSEApowernested(): Find the power of rejecting a pair of different models or retaining a pair of models similar models using a pair of RMSEA values given sample size (MacCallum, Browne, & Cai, 2006)
  • plotRMSEApowernested(): Plot the power of rejecting a pair of different models or retaining a pair of models similar models using a pair of RMSEA values given a range of sample size
  • findRMSEAsamplesizenested(): Find the minimum sample size given the desired power using a pair of RMSEA

Missing Data Analysis

  • auxiliary(): Automatically add auxiliary variables to a lavaan model using full information maximum likelihood
  • twostage(): Two-stage maximum likelihood in SEM. The current function will implement 2-stage ML (optionally using auxiliary variables) using lavaan to fit the model(s) in each step
  • fmi(): Find fractions of missing information (FMI) for summary statistics (means and (co)variances of continuous variables, thresholds and polychoric/polyserial correlations of ordered variables) from a single incomplete data set (using missing = "FIML") or a list of imputed data sets
  • bsBootMiss(): Model-based (Bollen-Stine) bootstrap with incomplete data
  • quark() and combinequark(): Principal component method to reduce the number of auxiliary variables for use in FIML estimation

Latent Interaction

  • indProd() and orthogonalize(): Creating indicator products without centering, with mean centering (Marsh, Wen, & Hau, 2004), with double mean centering (Lin et al., 2010), or with residual centering (Little, Bovaird, & Widaman, 2006) by all possible combinations or match-paired methods (Marsh et al., 2004)
  • probe2WayMC(): Probing two-way latent interaction with mean or double-mean centering
  • probe3WayMC(): Probing three-way latent interaction with mean or double-mean centering
  • probe2WayRC(): Probing two-way latent interaction with residual centering
  • probe3WayRC(): Probing three-way latent interaction with residual centering
  • plotProbe(): Plot the simple intercepts and slopes of latent interaction

Reliability of a Composite Score

  • compRelSEM(): Reliability of unit-weighted composites (e.g., sum scores or scale means) per construct. Also available for multidimensional, multilevel, and higher-order constructs, measured by continuous or categorical indicators (when enabled by lavaan).
  • maximalRelia(): Maximal reliability, which is the reliability of weighted summed scores such that the weights provide the maximum value of reliability (Li, 1997).
  • AVE(): The average variance extracted (i.e., average factor-variance saturation across indicators, analogous to communality) is not a reliability function, but was formerly included among indices returned by the deprecated reliability() function.

Parcelling

  • parcelAllocation(), PAVranking(), and poolMAlloc(): Parcel allocation variability investigation (Sterba, 2011; Sterba & MacCallum, 2010; Sterba & Rights, 2016)

Miscellaneous

  • plausibleValues(): Draw a distribution of plausible values of factor scores, to be treated as multiple imputations.
  • imposeStart(): Use parameter estimates from a lavaan output as starting values of another analysis model
  • monteCarloCI(): Mediation analysis using the Monte Carlo method (Selig & Preacher, 2012)
  • splitSample(): Randomly split samples into two different halves: a training and a (cross-)validation sample
  • loadingFromAlpha(): Estimate standardized factor loadings given a coefficient alpha when factor loadings are equally constrained (tau-equivalence)
  • tukeySEM(): Calculate Tukey's WSD post-hoc test for multiple group means comparison
  • kd(): Generate data based on the Kaiser-Dickman (1962) algorithm
  • net(): Test whether models estimated with ML are equivalent or nested
  • htmt(): Investigate the discriminant validity using Heterotrait-Monotrait Ratio
  • ekc(): Identify the number of factors to extract in EFA based on the Empirical Kaiser Criterion (EKC)