-
Notifications
You must be signed in to change notification settings - Fork 37
Functions
Terrence edited this page Mar 13, 2025
·
36 revisions
-
clipboard(): Copy the output of methods (e.g.,summary()) forlavaanobjects into the clipboard, which can be pasted in other programs such as Excel -
saveFile(): Save the attributes of thelavaanobject into a file -
compareFit(): Compare fit measures across multiple nested or nonnestedlavaanoutputs
-
skew()andkurtosis(): Univariate skewness and excessive kurtosis -
mardiaSkew()andmardiaKurtosis(): Mardia's multivariate skewness and kurtosis -
mvrnonnorm(): Convenience function to generate nonnormal data using Vale and Maurelli (1983) method
-
chisqSmallN(): chi-squared test statistic (or difference) adjusted for small sample size -
moreFitIndices()andnullRMSEA(): Calculate more fit indices fromlavaanobjects: 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
-
measEq.syntax(): Automates writinglavaanmodel 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()andpartialInvarianceCat(): 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
-
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
-
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
-
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 (usingmissing = "FIML") or a list of imputed data sets -
bsBootMiss(): Model-based (Bollen-Stine) bootstrap with incomplete data -
quark()andcombinequark(): Principal component method to reduce the number of auxiliary variables for use in FIML estimation
-
indProd()andorthogonalize(): 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
-
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 bylavaan). -
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 deprecatedreliability()function.
-
parcelAllocation(),PAVranking(), andpoolMAlloc(): Parcel allocation variability investigation (Sterba, 2011; Sterba & MacCallum, 2010; Sterba & Rights, 2016)
-
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)