Skip to content

SEM

Structural equation model written in lavaan-style model syntax: latent variables, regressions, (residual) covariances, labels, equality constraints and defined parameters such as indirect effects.

SEM /MODEL='statement' ['statement' …] [/GROUP=var] [/ESTIMATOR=ML|MLR|GLS|ULS|WLSMV] [/ORDINAL=varlist] [/MISSING=LISTWISE|FIML] [/IDENTIFY=MARKER|STDLV] [/MEANS] [/EQUAL=LOADINGS INTERCEPTS MEANS THRESHOLDS REGRESSIONS RESIDUALS RESIDUAL.COVARIANCES LV.VARIANCES LV.COVARIANCES] [/INVARIANCE=CONFIGURAL METRIC SCALAR STRICT|ALL] [/PRINT=FIT ESTIMATES STANDARDIZED RSQUARE MODINDICES RESIDUALS ALL] [/BOOTSTRAP=n] [/SAVE=FSCORES] [/CRITERIA=ITERATE(500) CIN(95) MI(3.84) MITOP(20)] [/PLOT=DIAGRAM [STANDARDIZED|UNSTANDARDIZED]|NONE].
Kind Procedure (reads data, produces output)
Body main /SUBCOMMAND[=] …
Changes data no
Subcommands /BOOTSTRAP, /CRITERIA, /EQUAL, /ESTIMATOR, /FACTORS, /GROUP, /IDENTIFY, /INVARIANCE, /MEANS, /MISSING, /MODEL, /ORDINAL, /PARAMETERIZATION, /PLOT, /PRINT, /SAVE
Menu Analyze ▸ Structural Equation Models
Slot: Observed variables 0+ variable(s); levels: nominal, ordinal, scale; types: numeric
  • MODEL: one or more quoted strings; statements are separated by ‘;’ or by the strings. f =~ x1 + x2 (f measured by), y ~ x (regression), y ~ 1 (intercept), a ~~ b (covariance), u | t1 + t2 (thresholds), name := expression (defined parameter), a == b (equal labels). Modifiers: 0.5x fixes, NAx frees, a*x labels, c(a, b)*x per group
  • ESTIMATOR: ML (default; expected-information standard errors), MLR (robust standard errors and a Yuan-Bentler scaled χ²), GLS, ULS (robust standard errors, mean-and-variance adjusted χ²) or WLSMV for ordinal indicators (polychoric correlations, diagonally weighted least squares)
  • ORDINAL: with WLSMV, the ordinal variables (default: every observed variable of the model; at most 15 categories each)
  • MISSING: LISTWISE drops incomplete cases; FIML (ML or MLR) uses every observed value under MAR
  • IDENTIFY: MARKER fixes each latent variable’s first loading to 1; STDLV fixes latent variances to 1 and frees all loadings
  • GROUP: fits the model in every group; /EQUAL makes the named parameter types equal across groups
  • INVARIANCE: fits configural, metric (equal loadings), scalar (+ intercepts, latent means free in later groups) and strict (+ residual variances) models and compares each with the previous one
  • PRINT: FIT, ESTIMATES, STANDARDIZED and RSQUARE by default; MODINDICES lists fixed parameters with large modification indices; RESIDUALS shows correlation residuals
  • BOOTSTRAP: n case resamples within groups (20–100000): percentile intervals for every free and defined parameter
  • SAVE: FSCORES adds regression factor scores FS_k for each latent variable
SEM /MODEL='ind60 =~ x1 + x2 + x3' 'dem60 =~ y1 + y2 + y3 + y4' 'dem60 ~ a*ind60' 'dem65 =~ y5 + y6 + y7 + y8' 'dem65 ~ b*dem60 + ind60' 'ind := a*b' /BOOTSTRAP=1000.
SEM /MODEL='f =~ x1 + x2 + x3; y ~ f + z' /ESTIMATOR=MLR /MISSING=FIML /PRINT=ALL.
  • Defaults follow lavaan’s sem(): marker loadings, free residual variances, covariances among exogenous latent variables, observed intercepts free and latent means zero.
  • Models with more free parameters than sample moments, or a latent variable without a scale, are refused before estimation.
  • The output includes a path diagram; Analyze ▸ Structural Equation Models ▸ Path Diagram Editor draws a model and writes this syntax.
  • With /ESTIMATOR=WLSMV, /ORDINAL may list a subset of variables (the rest are continuous); ordinal variables may be predictors; /EQUAL constraints work across groups.
  • Constraints: a == expression and inequalities a > 0, a < b, >=, <= over labels and defined parameters; a Constraints table reports each constraint’s slack and whether it is active.
  • WLSMV: with equal thresholds the scaling factors (y * y) and latent means are free after group 1; /INVARIANCE runs configural, metric and scalar models with a DIFFTEST-style comparison (strict invariance is not tested).
  • /PARAMETERIZATION=DELTA|THETA (WLSMV): theta makes latent-response residual variances parameters; /INVARIANCE with WLSMV adds a strict step (equal residual variances) in theta.

CFA, FACTOR, MEDIATION, REGRESSION


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.